[英]I am trying to clone project from bitbucket and running in VS Code while doing npm install showing a lot of errors, warning
I have project on bitbucket and trying to clone it, the project is very older 3 year old so might be some packages do get old.我在 bitbucket 上有一个项目并试图克隆它,这个项目已经有 3 年的历史了,所以可能有些包确实变老了。 But while I am doing
npm install
so it is showing a lot of warning and errors.但是当我进行
npm install
时,它显示了很多警告和错误。 Also the project at beginning made with Yarn not NPM.另外项目一开始是用 Yarn 做的,不是 NPM。
Some warning and error looks like:一些警告和错误看起来像:
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)
Remove your package-lock.json
and then execute npm install
(or yarn install
if you prefer).删除您的
package-lock.json
然后执行npm install
(如果您愿意,也可以执行 yarn yarn install
)。
Have in mind that being this an old project.请记住,这是一个旧项目。 Some of the packages passed for major changes and may possibly not run as expected anymore.
一些软件包通过了重大更改,可能不再按预期运行。 Major changes are not necessarily backward compatible, so you may have to change a lot of code in order to make your code work.
重大更改不一定向后兼容,因此您可能必须更改大量代码才能使您的代码正常工作。 Be ready to have a lot of fun coding!
准备好享受很多有趣的编码吧!
EDIT: Considering the package.json
you posted in a comment, my suggestion is creating a new app using npx create-react-app
and then moving your ReactJS code to it.编辑:考虑到您在评论中发布的
package.json
,我的建议是使用npx create-react-app
创建一个新应用,然后将您的 ReactJS 代码移至其中。 This way you would have a completely updated app and would have only to review your code.这样您将拥有一个完全更新的应用程序,并且只需要检查您的代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.