最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
解决Mac下安装nmp的淘宝镜像失败问题
时间:2022-06-25 16:02:04 编辑:袖梨 来源:一聚教程网
安装命令如下:
npm install -g cnpm --registry=https://registry.npm.taobao.org --verbose
提示报错,信息如下:
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
注意到这一句提示:
Please try running this command again as root/Administrator
于是将命令最后改为如下所示,成功安装
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org --verbose
相关文章
- 人们熟悉的寄居蟹属于以下哪种分类 神奇海洋11月21日答案 11-21
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21