发布网友 发布时间:2022-04-27 06:32
共2个回答
懂视网 时间:2022-05-15 04:38
这次给大家带来怎样处理Mac内安装nmp淘宝镜像失败,处理Mac内安装nmp淘宝镜像失败的注意事项有哪些,下面就是实战案例,一起来看一下。安装命令如下:
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
相信看了本文案例你已经掌握了方法,更多精彩请关注Gxl网其它相关文章!
推荐阅读:
如何使用JS实现分页打印
mac内nodejs如何更新最新版本
热心网友 时间:2022-05-15 01:46
安装nodejs提示cnpm不是内部命令怎么办 答:cnpm不是内部命令说明,你的package.json里面依赖cnpm使用命令:npm install cnpm 即可安装安装好了有不会报这个错了 也可以使用nodejs自带的npm替换cnpm命令一样