npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues

AngularNpm InstallCore Js

Angular Problem Overview


I'm getting below error while creating a new Angular application -

npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

I tried the solution given in below link but it did not work for me- https://stackoverflow.com/questions/59354180/error-please-upgrade-your-dependencies-to-the-actual-version-of-core-js3

When I check version of Angular using 'ng --version' command, I see <error> as version for below listed packages -

@angular-devkit/architect    
@angular-devkit/core         
@angular-devkit/schematics   
@schematics/angular          
@schematics/update   

    

Could you please suggest what went wrong and what needs to be done to fix this?

P.S. - The same functionality was working fine a day before. And the already created projects are running fine locally.

Angular Solutions


Solution 1 - Angular

Indeed the issue was with cache. npm clean-install worked.

Solution 2 - Angular

It's a npm cache problem. Go to the path:

  • Windows: %AppData%/npm-cache
  • Linux/OSX: ~/.npm

and delete its content. Then open your console in administrator mode and execute the npm install command again

Solution 3 - Angular

Try:

npm cache clean --force
npm install -g @angular/cli@latest

Solution 4 - Angular

You should update the version of core-js to version above 3. npm install --save core-js@^3

You may also update the outdated packages using npm update [-g] [<pkg>...]

Solution 5 - Angular

I observed this warning message within a Vaadin project with Vaadin 14.1.3 after switching from dependency com.vaadin.vaadin to com.vaadin.vaadin-core. The warning was gone after these steps:

  1. delete package-lock.json
  2. execute mvn clean
  3. execute mvn update

Solution 6 - Angular

So the issue is of version of the packages you have in your project.

Run command npm outdated inside your project directory. And see the difference between the Current And Wanted version of packages.

And then upgrade all package to match wanted version.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionjaihindView Question on Stackoverflow
Solution 1 - AngularjaihindView Answer on Stackoverflow
Solution 2 - Angularnehemie konanView Answer on Stackoverflow
Solution 3 - AngularanubhabView Answer on Stackoverflow
Solution 4 - AngularnXnView Answer on Stackoverflow
Solution 5 - AngularS. DoeView Answer on Stackoverflow
Solution 6 - AngularSurjeet BhadauriyaView Answer on Stackoverflow