老师,我的node.js的环境都弄好了 直接输入淘宝镜像出现问题,如下
appledeMacBook-Pro:~ Aleeeeex$ node -v
v12.2.0
appledeMacBook-Pro:~ Aleeeeex$ npm -v
6.9.0
appledeMacBook-Pro:~ Aleeeeex$ npm install -g cnpm --registry=https://registry.npm.taobao.org
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! [OperationalError: EACCES: permission denied, symlink '../lib/node_modules/cnpm/bin/cnpm' -> '/usr/local/bin/cnpm'] {
npm ERR! cause: [Error: EACCES: permission denied, symlink '../lib/node_modules/cnpm/bin/cnpm' -> '/usr/local/bin/cnpm'] {
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! stack: 'Error: EACCES: permission denied, symlink ' +
npm ERR! "'../lib/node_modules/cnpm/bin/cnpm' -> " +
npm ERR! "'/usr/local/bin/cnpm'",
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!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/apple./.npm/_logs/2019-05-13T04_18_49_437Z-debug.log
appledeMacBook-Pro:~ Aleeeeex$
正在回答
同学你好!
你可以检查一下是否下载了淘宝镜像:
cnpm -v
下载了node.js之后如果没有下载淘宝镜像不可以直接使用cnpm哦
下载淘宝镜像:npm install -g cnpm --registry=https://registry.npm.taobao.org
如果帮助到了你 欢迎采纳 祝学习愉快~
- 参与学习 人
- 提交作业 209 份
- 解答问题 3299 个
本路径是通过ES6基础知识、运用Zepto、Swiper、fullPag等移动端常用工具包、以及当下流行框架Vue,结合多个实战案例,还原真实开发场景,最终实现手机端购物商城网页开发。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星