-1

I can’t install gulp, I looked at a lot of solves, but couldn't find a solution.

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

It started to install, but then gives an error.

Any ideas?

tomerpacific
  • 4,704
  • 13
  • 34
  • 52
  • 1
    Possible duplicate of [NPM modules won't install globally without sudo](https://stackoverflow.com/questions/19352976/npm-modules-wont-install-globally-without-sudo) – esqew Mar 17 '20 at 16:32

1 Answers1

-1

As the error says, your user profile doesn't have access to write to the global node_modules folder at /usr/local/lib/node_modules.

Run the same command with sudo, which will use root permissions to execute the same command:

sudo npm install --global gulp-cli
esqew
  • 42,425
  • 27
  • 92
  • 132
  • This does not work. Check out... https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally – doublejosh Apr 26 '21 at 18:47