我已经安装了nodejs。我想使用npm命令安装expressjs。虽然安装我有一些错误。
错误是:
D:\>cd expressfirstprogram
D:\expressfirstprogram>npm install express
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "express"
npm ERR! node v7.5.0
npm ERR! npm v4.1.2
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! unable to get local issuer certificate
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! D:\expressfirstprogram\npm-debug.log
D:\expressfirstprogram>
你可以帮我解决这个问题吗?
答案 0 :(得分:1)
尝试关闭.npmrc
.npmrc文件:
strict-ssl=false
然后运行npm install express --save
链接到解决方案。 https://github.com/npm/npm/issues/9580#issuecomment-166605021