我安装@angular2-材料/核心(或任何其他模块)与npm不会让我安装任何模块。
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "@angular2-material/core"
npm ERR! node v5.11.1
npm ERR! npm v3.8.6
npm ERR! must have a URL that starts with http: or https:
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>我试过:
npm set registry https://registry.npmjs.org/ // https或
npm set registry http://registry.npmjs.org/ // http 但这是行不通的,我向物质人提出了这个问题,但他们说这是我的本地问题。
这真让我难受,根本不知道怎么解决它。
发布于 2016-07-12 02:50:53
这主要是因为您尝试过多个注册中心,现在npm有点混乱,您需要打开.npmrc并删除不必要的注册表路径。
要找到您的.npmrc:
npm config ls -l | grep config你会看到这样的情况:
userconfig /Users/Yourname/.npmrc 然后用编辑器打开该文件,并编辑和删除额外的不必要的注册表。
https://stackoverflow.com/questions/38298213
复制相似问题