1

When I add the android platform for ionic, its getting an error like missing write permission

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:

Anjali Sharma
  • 535
  • 6
  • 15

4 Answers4

0

You miss rights to write in the folder Try to execute this cmd :

sudo chown -R $USER /usr/local/lib/node_modules
devseo
  • 1,182
  • 1
  • 13
  • 26
0

According to this

https://flaviocopes.com/npm-fix-missing-write-access-error/

solution 1)

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

solution 2)

sudo npm install -g

solution 3)

Permission denied when installing npm modules in OSX

Chanaka Weerasinghe
  • 5,404
  • 2
  • 26
  • 39
0

If you're doing a fresh install of Node on Mac OS, you can avoid this problem altogether by using the Homebrew package manager. Homebrew sets things up out of the box with the correct permissions.

brew install node

My issue solved by using this command

0

you are getting permission problem, that's why u are getting problem

it can resolved by giving permission

sudo var chmod 777 /directory/
Anjali Sharma
  • 535
  • 6
  • 15