Mac环境下 安装wepy-cli命令出错

p5fdfcr1  于 2022-10-20  发布在  Mac
关注(0)|答案(3)|浏览(214)

npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access '/usr/local/lib/node_modules'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
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/dream/.npm/_logs/2018-10-26T16_18_08_340Z-debug.log

n1bvdmb6

n1bvdmb61#

在调用npm install之前使用sudo,或者切换到root用户。
sudo npm install wepy-cli -g

vktxenjb

vktxenjb2#

mac系统建议使用nvm安装node,再安装wepy,试一下

dgsult0t

dgsult0t3#

$ nvm --version
0.32.1
$ node
v6.9.1

供参考,以上版本正常

相关问题