之后“ npm i -g npm”我的项目停止工作

发布于 2025-01-20 09:36:47 字数 804 浏览 0 评论 0原文

我想安装lodash,官方网站建议运行,

npm i -g npm

我猜它已更新了NPM版本。之后,我跑了

npm i --save lodash

,然后输出了这一点:

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 

我想这更改了项目中的package-lock.json文件。之后,一些依赖性问题开始了,当我试图运行我的角度项目时,它停止了一个错误:

sh: 1: ng: not found
sh: 1: gulp: Permission denied

Process finished with exit code 127

在Gulp开始警告之前,它只是NG的:找不到我用“ NPM link @angular/cli”固定的。命令。在这一点上,我认为我做了一些完全错误的事情,因为我已经尝试安装新的NPM版本,并且无法解决问题。有人知道这里出了什么问题吗?

I wanted to install lodash, and official website suggested running

npm i -g npm

Which I guess updated npm version. After that I ran

npm i --save lodash

And it outputed this:

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 

Which I guess changed my package-lock.json file in the project. After that some dependencies issues started and when I tried to run my Angular project it stopped compiling it with an error of:

sh: 1: ng: not found
sh: 1: gulp: Permission denied

Process finished with exit code 127

Before Gulp started to warn about permission it was only ng: not found which I fixed with "npm link @angular/cli" command. At this point I think I did something completely wrong because I already tried to install newer npm version and it didn't resolve the issue. Anyone have an idea what went wrong here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文