2

nodemon package does not successfully install using nodejs. I used npm install -g nodmon. I received the permissions-related error below.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/nodemon/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! path ../lib/node_modules/nodemon/bin/nodemon.js
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/nodemon/bin/nodemon.js' -> '/usr/bin/nodemon'
npm ERR!  { [Error: EACCES: permission denied, symlink '../lib/node_modules/nodemon/bin/nodemon.js' -> '/usr/bin/nodemon']
npm ERR!   cause:
npm ERR!    { Error: EACCES: permission denied, symlink '../lib/node_modules/nodemon/bin/nodemon.js' -> '/usr/bin/nodemon'
npm ERR!      errno: -13,
npm ERR!      code: 'EACCES',
npm ERR!      syscall: 'symlink',
npm ERR!      path: '../lib/node_modules/nodemon/bin/nodemon.js',
npm ERR!      dest: '/usr/bin/nodemon' },
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, symlink \'../lib/node_modules/nodemon/bin/nodemon.js\' -> \'/usr/bin/nodemon\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../lib/node_modules/nodemon/bin/nodemon.js',
npm ERR!   dest: '/usr/bin/nodemon' }
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!     /home/etech7/.npm/_logs/2019-07-02T11_31_52_856Z-debug.log
georgeawg
  • 48,608
  • 13
  • 72
  • 95
Jalodara Jayesh
  • 327
  • 3
  • 17
  • 1
    maybe try this: https://stackoverflow.com/questions/54972076/npm-install-not-working-says-that-i-need-to-check-permissions – Sentinel Jul 02 '19 at 12:22
  • I would install [nvm](https://github.com/nvm-sh/nvm). Node Version Manager manages your global packages so they all reside in your home directory which means you don't have to use `sudo` to install them. – technogeek1995 Jul 02 '19 at 13:24

2 Answers2

9

Try to install it with sudo. It it because you need admin permissions.

sudo npm install -g nodemon

Hope it helps!

Rick
  • 159
  • 1
  • 5
0

This is a permissions issue, as indicated by the error message. You need to fix your permissions or use sudo. Please see: npm throws error without sudo

tantalum
  • 2,354
  • 1
  • 15
  • 22