-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Can't resolve" importing errors when using canvg #23254
Comments
I just skimmed over your issue and before digging deeper into it, have seen this issue already? Gatsby uses core-js@2 and this might be the cause of the problem? |
@LekoArts That shouldn't matter, because npm supports having multiple versions of the same package at the same time. This is clear because The problem is that Gatsby is not properly loading This is a module resolution problem, not a version problem. This problem will happen anytime multiple versions of the same package exist (not just |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Hello! This is not yet resolved |
So this was interested here to solve this issue. I'm not sure right now how to resolve your issue and not break theirs. |
I personally don't understand why a library is explicitly depending on core-js and importing it's functionality. Usually libraries should just write the code to achieve a solution, and if polyfills are needed, the end users webpack/babel set up will take care of that. |
@blainekasten You will have to ask canvg that, we don't control their library. Although I agree with you that core-js should be left up to the user, gatsby should still work with libraries which choose to use core-js. Overriding specific hardcoded libraries like core-js and react-hot-loader seems like a very fragile solution. |
This problem does not allow me to run my gitlab CI :( Is there a way to fix or patch? |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Thanks again for being part of the Gatsby community! 💪💜 |
Hey! Latest version of gatsby upgrades to core-js@3. Try out the new version, it should fix your errors! |
@blainekasten Hello, I keep getting the same error (there are actually several) but this is one of them:
|
Description
I am speaking on behalf of amCharts. Our users have found some errors when using amCharts with Gatsby. You can see more details here.
Our library internally uses
canvg
, which usescore-js
. When compiling, Gatsby is unable to find thecore-js
files, even though those files exist.This is a problem specifically with Gatsby, it does not happen with create-react-app or Angular.
Steps to reproduce
I have created a reduced test case.
I created it with the following steps:
Create a new hello world template.
Make these changes.
Run
yarn install
and thenyarn gatsby develop
.Expected result
The project should compile fine.
Actual result
I get the following errors when compiling:
I have verified that the
node_modules/canvg/node_modules/core-js/modules/*
files do exist, Gatsby is simply unable to find them.Environment
The text was updated successfully, but these errors were encountered: