npm 8.1.2 |
Npm throws the error below when I use
npm install, I believe it is about versions but not sure, I installed
npm version 7.19.1 but still got the same error, any idea why and how to solve this issue?
npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile npm WARN deprecated firstname.lastname@example.org: Please update to ini >=1.3.6 to avoid a prototype pollution issue npm WARN deprecated email@example.com: this library is no longer supported npm WARN deprecated firstname.lastname@example.org: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm WARN deprecated email@example.com: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated firstname.lastname@example.org: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated email@example.com: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) npm WARN deprecated firstname.lastname@example.org: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
That means that the
package-lock.json file was created while performing an
npm install with an
npm version less than 7.
npm 7 has changed not only the format of
package-lock.json, but also how it handles peer dependencies. When you upgrade to a newer
npm version ( >=7 ) make sure to test everything properly with a freshly checked out repo that still has the old file version.
You can resolve the issue (when all testing went well) by committing and pushing the
package-lock.json in the new format.
Answered By – connexo
Answer Checked By – Marie Seifert (Easybugfix Admin)