-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Support core-js@3.0.0 #13954
Comments
You can do that to resolve this issue: core-js Issue#412. That configuration resolve this problem, but others appear, such as: In the version 3.0.0 of core-js, there are many changes, including in the path of some folders and files. |
To fix this issue sooner, instead of upgrading to core-js@3 you just need to add core-js@2 to the Used at angular-cli/packages/angular_devkit/build_angular/src/angular-cli-files/models/jit-polyfills.js Line 8 in 0bb03d3
|
Anyone working on Windows fix the issue mentioned here? |
Copy paste version :)
|
Does not work for me. |
@alexfung888 Check paths. Maybe you need:
|
Work for me, today update Angular CLI lastest. Thanks |
Workaround doesn't work for me (nor with ./ in paths) |
Update to lastest version doesn't work for me.
|
@ericardezp version with the fix was not released yet |
I can confirm that workaround didn't work for me and adding
Edit: |
Same! It's for an old project from a tutorial though... I thought it was just dependencies. I'm confused! |
Only thing that worked for me was to delete node_modules and npm install again without any of the solutions added above. Good luck 🤞 |
@Lirianna None of these solutions are working for me either. Did you update core-js to version 3 and also delete package-lock file then npm install? Or just update then delete node_modules then npm install? I've even tried but I still get the error for import 'core-js/es7/reflect'; EDIT: I fixed it by moving the paths bit to the tsconfig.app.json file as I already had paths there for moment.js. So my paths within tsconfig.app.json file looks like so:
|
Confirming this solution is working with angular-cli at 7.3.8 "paths": { |
WORKS!! This is my tsconfig.app.json file:
|
I confirm @ericardezp solution worked for me. I did not need to add |
This works for me (Angular CLI: 7.3.8)
|
Any ideas when this work around will no longer be needed? |
Angular CLI 7.x should be using core-js@2.x. The semver ranges provided in a new project are specifically chosen to ensure compatibility with Angular and the Angular CLI. |
I can build my project success if I configuration file tsconfig.json: File configuration package.json |
This worked for myself. Remember that the tsconfig.json is being imported during compile to the tsconfig.app.json.
ng version
|
I'm assuming that's why you can't have "paths" twice or the merge doesn't go smoothly. If you already define "paths" in the tsconfig.app.json file then add to that, otherwise you can put it in either tsconfig.app.json or tsconfig.json. Then the dots before the / just determine where node_modules are in relation to where "paths" is read from. |
Can you elaborate here? Do I have to build via the CLI in order to leverage this poly fills, or can I import them while using another bundler? |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🚀 Feature request
core-js 3.0.0 is released, but
ng serve
fails with errorWith
core-js@3.0.0
it'simport 'core-js/proposals/reflect-metadata';
Workaround: Add this to your tsconfig.json:
Command (mark with an
x
)The text was updated successfully, but these errors were encountered: