D:\Users\p\myapp>npm install express --save
npm ERR! code E404
npm ERR! 404 Not Found - GET http://registry.npmjs.org/express
npm ERR! 404
npm ERR! 404 'express@latest' 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! D:\Users\p\AppData\Roaming\npm-cache\_logs\2019-07-24T10_10_58_628Z-debug.log
答案 0 :(得分:0)
似乎是缓存错误,请运行以下命令对其进行修复
npm cache clean --force
然后尝试重新安装
答案 1 :(得分:0)
这可能由于多种原因而发生,我所知的很少:
如果您的互联网连接是通过代理连接的,则需要进行配置,请查看此链接以获取更多信息(enter link description here):
$ npm config set proxy http://<username>:<password>@<proxy-server-url>:<port>
$ npm config set https-proxy http://<username>:<password>@<proxy-server-url>:<port>
否则可能是这样,请检查并尝试设置npm注册表:
npm config set registry http://registry.npmjs.org