转自:项目初始化报 404 Not Found - GET https://registry.npmjs.org
npm install报 404 Not Found - GET https://registry.npmjs.org
解决办法:
1.先查看当前的代理设置
npm config get proxy
2.如果代理设置时null,则需要配置新的代理地址
npm config set registry 新的地址# 根据情况 是公司项目的地址还是默认的国内cnpm淘宝镜像# npm config set registry https://registry.npm.taobao.org# npm config set registry https://registry.cnpmjs.org/
————————————————
版权声明:本文为CSDN博主「Zang_WS」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_41759744/article/details/119177181
npm使用时报npm ERR! code E405npm ERR! 405 Method Not Allowed
博主用npm安装@vue/cli的时候,npm报了如下的错误。
npm ERR! code E405
npm ERR! 405 Method Not Allowed - GET https://registry.npmjs.org/typescript/undefined
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-08-04T22_15_32_426Z-debug.log
//然后我在C:\Users\{username}打开了.npmrc文件。
把registry=https://registry.npmjs.org/typescript
修改为registry=https://registry.npmjs.org
再重新安装。于是问题解决了。