An error was reported during the installation of cnpm Taobao mirroring

Follow the command of npm to install cnpm:

npm install -g cnpm --registry=https://registry.npm.taobao.org

If an error is reported:

npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm ERR! path C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\.bin\npm.cmd
npm ERR! code EEXIST
npm ERR! Refusing to delete C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\.bin\npm.cmd: ..\npm\bin\npm-cli.js symlink target is not controlled by npm C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm
npm ERR! File exists: C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\.bin\npm.cmd
npm ERR! Move it away, and try again.

After checking a few blogs, try the following:

npm config set registry https://registry.npm.taobao.org
npm config get registry
npm install nrm -g

Still useless, continue to report errors:

 

To no avail, after restarting the computer in the afternoon, after finding the project and opening CMD, continue to enter the installation command:

npm install cnpm -g --registry=https://registry.npm.taobao.org

It's really hard to be better by yourself

Finally, I strongly recommend that you can use cnpm install instead of npm install to do vue projects . After all, it is faster and convenient. It may be an hour after the installation of npm install and sometimes it is not necessarily. Come on!

Reference article:

[1] npm and cnpm

[2] cnpm installation error

[3] Use npm to install cnpm and report an error

Guess you like

Origin blog.csdn.net/XU441520/article/details/114977109