簡體   English   中英

我正在嘗試從 bitbucket 克隆項目並在 VS Code 中運行,同時執行 npm 安裝顯示很多錯誤,警告

[英]I am trying to clone project from bitbucket and running in VS Code while doing npm install showing a lot of errors, warning

我在 bitbucket 上有一個項目並試圖克隆它,這個項目已經有 3 年的歷史了,所以可能有些包確實變老了。 但是當我進行npm install時,它顯示了很多警告和錯誤。 另外項目一開始是用 Yarn 做的,不是 NPM。

一些警告和錯誤看起來像:

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 deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fe
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7[1] || >=4 <4.3.1 have a low-severity ReDos regression when used incommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)

刪除您的package-lock.json然后執行npm install (如果您願意,也可以執行 yarn yarn install )。

請記住,這是一個舊項目。 一些軟件包通過了重大更改,可能不再按預期運行。 重大更改不一定向后兼容,因此您可能必須更改大量代碼才能使您的代碼正常工作。 准備好享受很多有趣的編碼吧!

編輯:考慮到您在評論中發布的package.json ,我的建議是使用npx create-react-app創建一個新應用,然后將您的 ReactJS 代碼移至其中。 這樣您將擁有一個完全更新的應用程序,並且只需要檢查您的代碼。

暫無
暫無

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

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