我们目前正在 Angular 8 上更新 Angular 7.2 版本。
运行命令后sudo ng update @angular/cli @angular/core,有很多错误信息,如下所示:
404 未找到 - 获取https://my-company-registry/leaflet
我们使用公司注册表,我在上面的链接中对其进行了重命名。
到目前为止,一切正常,但突然出现上述错误消息。即使是简单的npm install package-name命令。
我已经在我的项目或全局文件中检查了我的 .npmrc 文件,并尝试了类似npm cache clear --forceor的命令npm cache verify。
我还删除了我的 node-modules 文件夹并尝试再次安装所有内容。不行。。
如果我尝试使用sudo npm update npm -g我会收到以下错误:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://my-company-registry/npm
npm ERR! 404
npm ERR! 404 'npm@^6.9.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/codehan/.npm/_logs/2019-09-20T12_51_34_857Z-debug.log