题目描述
其它问题其它小伙伴都差不多解决了,有个重要的问题如下
1;在mac上安装Vue Cli官网给的命令npm install -g @vue/cli时报错,如下:
yanxudeMacBook-Pro:vue3 dove$ npm install -g @vue/cli
npm WARN deprecated fsevents@1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
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/dove/.npm/_logs/2019-11-14T07_30_27_188Z-debug.log
解决方法:先输入这句指令:sudo chown -R $(whoami) /usr/local/*因为对于高版本的OS解决不了。
在输入npm i -g @vue/cli
解决!
干脆弄个占位符。
hhh