Home >Web Front-end >JS Tutorial >How to deal with failure to install nmp Taobao image on Mac
This time I will bring you how to deal with the failure of installing the nmp Taobao image in the Mac. What are the precautions? The following is a practical case. Let’s take a look.
The installation command is as follows: npm install -g cnpm --registry=https://registry.npm.taobao.org --verbose
An error message is reported and the information is as follows: npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cnpm" "--registry=https://registry.npm.taobao.org" "--verbose"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! path ../lib/node_modules/cnpm/bin/cnpm
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/cnpm/bin/cnpm' -> '/usr/local/bin/cnpm'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, symlink '../lib/node_modules/cnpm/bin/cnpm' -> '/usr/local/bin/cnpm'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/cnpm/bin/cnpm',
npm ERR! dest: '/usr/local/bin/cnpm' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm verb exit [ -13, true ]
npm ERR! Please include the following file with any support request:
npm ERR! /Users/xxx/npm-debug.log
Notice this prompt:Please try running this command again as root/Administrator
So the command was finally changed to the following, and the installation was successful
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org --verbose
Believe it or not After reading the case in this article, you have mastered the method. For more exciting information, please pay attention to other related articles on the PHP Chinese website!
Recommended reading:
How to use JS to implement paging printingHow to update the latest version of nodejs in macThe above is the detailed content of How to deal with failure to install nmp Taobao image on Mac. For more information, please follow other related articles on the PHP Chinese website!