簡體   English   中英

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 ) 時,請確保使用仍然具有舊文件版本的新簽出的 repo 正確測試所有內容。

您可以通過提交並推送新格式的package-lock.json來解決問題(當所有測試順利時)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM