解决Mac下安装nmp的淘宝镜像失败问题

网络编程 2021-07-04 16:45www.168986.cn编程入门
今天长沙网络推广就为大家分享一篇解决Mac下安装nmp的淘宝镜像失败问题,具有很好的参考价值,希望对大家有所帮助。一起跟随长沙网络推广过来看看吧

安装命令如下

npm install -g pm --registry=https://registry.npm.taobao. --verbose

提示报错,信息如下

npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "pm" "--registry=https://registry.npm.taobao." "--verbose"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! path ../lib/node_modules/pm/bin/pm
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink

npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/pm/bin/pm' -> '/usr/local/bin/pm'
npm ERR!  at Error (native)
npm ERR! { Error: EACCES: permission denied, symlink '../lib/node_modules/pm/bin/pm' -> '/usr/local/bin/pm'
npm ERR!  at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/pm/bin/pm',
npm ERR! dest: '/usr/local/bin/pm' }
npm ERR! 
npm ERR! Please try running this mand 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

注意到这一句提示

Please try running this mand again as root/Administrator 

于是将命令改为如下所示,成功安装

sudo npm install -g pm --registry=https://registry.npm.taobao. --verbose

以上这篇解决Mac下安装nmp的淘宝镜像失败问题就是长沙网络推广分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持狼蚁SEO。

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by