Search code examples
angularangular9package-lock.jsonng-upgrade

NPM Error old lockfile The package-lock.json file was created with an old version of NPM


package-lock.json creating problem for upgrading Angular 9 to 10

How can I create a fresh package-lock.json file and update Angular 9 to 10?

I want to update Angular 9 to 10 and want to solve this package-lock.json error.


Solution

  • this is related to your node version.

    Something you can do is change the version according to this compatibility table https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3.

    Then delete the node_modules folder and the package-lock.json and run "npm i".

    It should work, let me know