0

saif@saifrakib:~/Project/NodeJs/second-node$ npm install -g nodemon

npm WARN checkPermissions Missing write access to /usr/local/lib npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/nodemon/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/local/lib npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access '/usr/local/lib' npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib'] npm ERR! stack: npm ERR! 'Error: EACCES: permission denied, access '/usr/local/lib'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib' } 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! /home/saif/.npm/_logs/2021-10-22T09_54_02_012Z-debug.log

  • can you try providing access to the given folder. use `sudo chmod 777 /usr/local/lib/*` – user11823877 Oct 22 '21 at 10:06
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Oct 22 '21 at 19:11

1 Answers1

1

Change your file permissions.

sudo chown -R $USER /usr/local/lib/node_modules

Or please check the below link

Error: EACCES: permission denied, access '/usr/local/lib/node_modules'

Nouman Shah
  • 103
  • 1
  • 9