I had cnpm installed on my machine before, but I didn’t use it for a while. This time, I couldn’t execute the command in cnpm -v. I even deleted the previous node. I downloaded it again, please help me.
滿天的星座2017-05-16 13:41:36
After uninstalling cnpm with npm, reinstall cnpm. But I think the best way is to add --registry=https://registry.npm.taobao.org after the npm command every time. Although it is a little troublesome, it is very stable and not too troublesome.
曾经蜡笔没有小新2017-05-16 13:41:36
No need for cnpm, just use npm.
Directly modify the npm warehouse address:
npm config set registry https://registry.npm.taobao.org
At this time, the .npmrc file will be created in the user folder of the c drive (it is the configuration file of npm), and inside it is registry=https://registry.npm.taobao.org/
You can use npm directly in the future.