收到一个404错误,因为npm安装的请求URL是随机添加单词“清除”

如下面的代码所示,npmregistry的URL是https://registry.npmjs.org/clear/ionic ,它应该是https://registry.npmjs.org/ionic 。 我已经完全卸载节点和NPM,重新启动我的电脑,并重新安装,但我仍然得到同样的问题。 虽然之前我无法安装离子和cordova,但是这个URL问题只是在清除我的控制台之后才出现的。 然而,我不知道如何可以影响registry的url。

 npm install -g ionic cordova npm ERR! Darwin 16.3.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ionic" "cordova" npm ERR! node v6.9.4 npm ERR! npm v3.10.10 npm ERR! code E404 npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/clear/ionic npm ERR! 404 npm ERR! 404 'clear' 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! Please include the following file with any support request: npm ERR! /Users/zacharymelancon/npm-debug.log 

此问题已通过运行得到解决

 npm config set registry https://registry.npmjs.org/