Npm 安装抛出警告旧锁文件错误
Npm install throws warn old lockfile error
npm 8.1.2
| node 16.13.1
Npm 在我使用 npm install
时抛出以下错误,我相信这是关于版本但不确定,我安装了 npm
版本 7.19.1 但仍然出现相同的错误,知道为什么以及如何解决这个问题?
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 ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm WARN deprecated debug@3.2.6: 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 uuid@3.4.0: 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 request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated mkdirp@0.5.1: 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 node-pre-gyp@0.11.0: 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
这意味着 package-lock.json
文件是在执行 npm install
且 npm
版本低于 7 时创建的。
npm 7
不仅改变了 package-lock.json
的格式,还改变了它处理对等依赖的方式。当您升级到较新的 npm
版本 ( >=7 ) 时,请确保使用仍然具有旧文件版本的新签出的存储库正确测试所有内容。
您可以通过提交并推送新格式的 package-lock.json
来解决问题(当所有测试都顺利进行时)。
npm 8.1.2
| node 16.13.1
Npm 在我使用 npm install
时抛出以下错误,我相信这是关于版本但不确定,我安装了 npm
版本 7.19.1 但仍然出现相同的错误,知道为什么以及如何解决这个问题?
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 ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm WARN deprecated debug@3.2.6: 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 uuid@3.4.0: 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 request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated mkdirp@0.5.1: 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 node-pre-gyp@0.11.0: 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
这意味着 package-lock.json
文件是在执行 npm install
且 npm
版本低于 7 时创建的。
npm 7
不仅改变了 package-lock.json
的格式,还改变了它处理对等依赖的方式。当您升级到较新的 npm
版本 ( >=7 ) 时,请确保使用仍然具有旧文件版本的新签出的存储库正确测试所有内容。
您可以通过提交并推送新格式的 package-lock.json
来解决问题(当所有测试都顺利进行时)。