背景:是Mac系统 的菜鸟。 在悠闲的时光,想使用vue-cli 搭一个脚手架手写一个个人网站,结果在第一步就出现了问题。
问题如下:
我愉快的在键盘上敲下 npm install -g @vue/cli 时 报了一个错
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.
于是我使用了我顶级的英语八级翻译(google translate)出是安装权限等级不够,
于是我使用了 sudo npm install -g @vue/cli
于是完美的安装成功了!