mac os 不安装 gulp
mac os don't install gulp
无法安装gulp,看了很多解决办法,都没有找到解决方法
Air-Yaroslav:~ yaroslav$ npm install --global gulp-cli
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
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: "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!
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/yaroslav/.npm/_logs/2020-03-17T09_50_56_975Z-debug.log
开始安装,然后报错
有什么想法吗?
如错误所述,您的用户配置文件无权写入位于 /usr/local/lib/node_modules
的全局 node_modules
文件夹。
运行与sudo
相同的命令,将使用root权限执行相同的命令:
sudo npm install --global gulp-cli
无法安装gulp,看了很多解决办法,都没有找到解决方法
Air-Yaroslav:~ yaroslav$ npm install --global gulp-cli
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
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: "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!
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/yaroslav/.npm/_logs/2020-03-17T09_50_56_975Z-debug.log
开始安装,然后报错
有什么想法吗?
如错误所述,您的用户配置文件无权写入位于 /usr/local/lib/node_modules
的全局 node_modules
文件夹。
运行与sudo
相同的命令,将使用root权限执行相同的命令:
sudo npm install --global gulp-cli