-
Notifications
You must be signed in to change notification settings - Fork 320
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 'core-js/modules/es.*' #2295
Comments
We're looking into this. Meanwhile it would help if you could provide all the modules and versions you are using in your app. |
I have core-js 2.0.* as a dependecy for @babel. Amcharts4 is using canvg 3.0.* since version 4.9.10 which has core-js 3.0.* as a dependency. My guess is that canvg is trying to load the core-js from the wrong place, because the files exist in the canvg node_modules. |
My dependecies: {
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.8.4",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-syntax-export-default-from": "^7.8.3",
"@babel/preset-env": "^7.8.4",
"@babel/preset-react": "^7.8.3",
"@babel/preset-typescript": "^7.8.3",
"@hot-loader/react-dom": "16.8.6",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.2.0",
"@testing-library/react-hooks": "^2.0.1",
"@types/jest": "^25.1.1",
"@typescript-eslint/eslint-plugin": "^2.19.0",
"@typescript-eslint/parser": "^2.19.0",
"audit-ci": "^1.7.0",
"babel-eslint": "^9.0.0",
"babel-jest": "^24.8.0",
"babel-loader": "^8.0.0",
"clean-webpack-plugin": "^0.1.19",
"css-loader": "^1.0.0",
"css-modules-typescript-loader": "^4.0.0",
"cssnano": "^4.1.4",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.18.3",
"fork-ts-checker-webpack-plugin": "^4.0.3",
"husky": "^1.3.1",
"identity-obj-proxy": "^3.0.0",
"import-cwd": "^2.1.0",
"jest": "^24.8.0",
"lint-staged": "^8.1.4",
"mini-css-extract-plugin": "^0.5.0",
"node-sass": "^4.13.1",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"postcss-import": "^12.0.0",
"postcss-loader": "^3.0.0",
"postcss-nested": "^4.1.0",
"postcss-preset-env": "^6.0.0",
"postcss-scss": "^2.0.0",
"prettier": "^1.19.1",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.0",
"type-coverage": "^2.4.0",
"uglifyjs-webpack-plugin": "^2.1.1",
"webpack": "4.29.6",
"webpack-assets-manifest": "^3.1.1",
"webpack-bundle-analyzer": "^3.0.3",
"webpack-cli": "3.3.0",
"webpack-dev-server": "^3.2.1",
"webpack-merge": "^4.1.4",
"webpack-node-externals": "^1.7.2",
"webpack-notifier": "1.6.0"
},
"dependencies": {
"@amcharts/amcharts4": "^4.9.12",
"@types/react": "^16.9.20",
"classnames": "2.2.6",
"core-js": "^3.6.4",
"flatpickr": "^4.6.1",
"i18next": "^17.0.11",
"i18next-fetch-backend": "0.0.1",
"imask": "4.1.5",
"moment": "2.24.0",
"react": "^16.12.0",
"react-bootstrap": "0.32.4",
"react-dom": "16.8.6",
"react-hot-loader": "4.11.1",
"react-i18next": "^10.12.0",
"reselect": "4.0.0",
"shortid": "2.2.14",
"typescript": "^3.7.5",
"whatwg-fetch": "2.0.3"
}
}``` |
Can confirm this, let me know if/what details you want for debugging. I went 4.6.X -> 4.9.12 (broken) then -> 4.9.9 per the first comment and it works perfectly. Thank you and keep up the great work. |
@vladluca Your |
So I have core-js 2 as a dependency for @babel and core-js 3 as a dependency for canvg. From what I can see, core-js 2 is installed top-level in node_modules while core-js 3 is installed as a nested dependency inside canvg node_modules. The problem is that canvg is trying to read from the top-level core-js 2 instead of reading from it's own node_modules. Thanks!
|
@vladluca Thanks. I'm still unable to reproduce this, even when using the Babel dependencies. If you run If not, try deleting your |
Already tried but with no luck 😐 |
@vladluca Could you share more of your configuration? Such as your Or even better, if you could create a repo which reproduces the problem. |
It looks more like a problem with my configuration or even npm, I'm not sure at the moment, but I think it does not make sense to waste more of your time since it's not an issue with amcharts. |
I have the same problem! Any solution? thanks! |
@aikodeio Please share your code (ideally in a GitHub repo) so we can figure out what the problem is. |
@aikodeio We cannot help you unless you show your code, because we cannot reproduce this problem with any of our examples. |
@Pauan I got similar issue when using |
@fxue89 I am also using GatsbyJs. Use the latest version of Gatsby with Amcharts version 4.8 and it works fine for now! |
I am also facing similar issue with my Quasar project (its UI framework build on vueJs). First I setup project using quasar CLI and it was working fine. but once i install '@amcharts/amcharts4' and '@amcharts/amcharts4-geodata' it start breaking with errors like, core-js related dependencies were not found, my dependencies and dev-dependencies are, "dependencies": { **Everything works fine if i use older version of amcharts (i.e. "@amcharts/amcharts4": "4.9.5"). but I need latest version of amcharts for my project. |
I have added 2.6.5 core-js in my dependency and everything seems to be working smoothly. |
@fxue89 Thanks for the tip, I was able to reproduce it in Gatsby. We're working on fixing it. |
It appears to be a bug in Gatsby, so I filed a new issue, it will be up to them to fix it. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
This issue has not been resolved yet. What is the workaround for now? |
@melvinotieno Wait for the next version of Gatsby, they have upgraded to core-js 3. |
Thank You
…On Mon, Jul 13, 2020 at 11:46 AM Pauan ***@***.***> wrote:
@melvinotieno <https://github.com/melvinotieno> Wait for the next version
of Gatsby, they have upgraded to core-js 3
<gatsbyjs/gatsby#25595>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2295 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK7YA3HRKQXYKJKOAM7TIE3R3LCYFANCNFSM4LU4UC4Q>
.
|
I managed to find the problem and it was in my webpack config. The fix was to change resolve: {
modules: [path.join(__dirname, 'node_modules')],
...
}, to: resolve: {
modules: ['node_modules'],
...
}, This was the reason why amcharts was getting the wrong core-js dependency from the top-level instead of looking for its own dependency. |
Hi guys, I'm facing the following error since updating from amcharts4 4.9.9 to 4.9.12.
The problem seems to be since amcharts4 uses canvg 3.0.*
Any ideea on how can it be fixed?
Thank you!
The text was updated successfully, but these errors were encountered: