安装命令如下:
提示报错,信息如下:
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! 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
注意到这一句提示:
于是将命令最后改为如下所示,成功安装
以上这篇解决Mac下安装nmp的淘宝镜像失败问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持编程之家。
原文链接:https://www.f2er.com/js/32300.html