安装npm时出现错误

3

我正在尝试在一个文件夹中执行 'npm install',但是我收到了错误代码E403 Forbidden

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher 
to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher 
to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail 
on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as 
possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 
(node_modules\chokidar\node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 403 Forbidden: 
https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz

npm ERR! code E403
npm ERR! 403 Forbidden: binary-extensions@^1.0.0

我的npm版本是5.5.1。 我的node版本是v8.9.1。

另外,我的系统今天被格式化了,我必须从头重新安装和设置所有东西。在我的系统被格式化之前,npm install一直在工作。

我在这里附上了日志文件。 https://github.com/angular/angular-cli/files/1499291/2017-11-23T13_25_27_656Z-debug.log

提前感谢。

编辑:每次npm install都失败。
为了参考,这是我的.npmrc文件中的条目:
registry=http://registry.npmjs.org/
proxy=http://user_name:password@proxy:port
https-proxy=http://user_name:password@proxy:port
strict-ssl=false

我尝试了许多命令来使其工作,但没有运气。
注意:我的密码包含'@'符号,但我已经在我的.npmrc文件中编码为%40。


sudo npm install ? - Sua Morales
根据 node-uuid 的 Github 页面,该 npm 包的名称已更改为 uuid。请尝试使用 npm install uuid 进行安装。 - pmaddi
@phanther 但那只是一个可以忽略的警告,错误在最后,错误代码为403: npm ERR!code E403 npm ERR!403 Forbidden:binary-extensions@^1.0.0 - Arfat
2个回答

0

从第一行开始,它表示旧的node-uuid模块已被弃用,并且将不再维护。请尝试使用以下命令重新安装。

npm uninstall --save node-uuid
npm install --save uuid

在第二行中,它要求安装minimatch库。 因此,请尝试运行以下命令:
npm install -g minimatch@3.0.4

0

好的,我解决了这个特定的问题。看起来我需要在注册表中将http更新为https,然后E403就消失了。但是我仍然面临其他问题,所以决定将npm降级到3.10.10,node降级到6.10.3。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接