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.
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.
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.
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.
No need for cnpm, just use npm.
Directly modify the npm warehouse address:
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.