0
votes

npm install -g ethereumjs-testrpc not working it is showing error

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/ethereumjs-testrpc' npm ERR! at Error (native) npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules/ethereumjs-testrpc'] npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules/ethereumjs-testrpc' } npm ERR! npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request: npm ERR! /home/user/npm-debug.log

1
npm install -g needs sudoraven
Throwing an errorChaitanya Rajeev
@ChaitanyaRajeev I think what @raven means is that in order for npm install -g to affect the /usr/local/lib/node_modules directory, it needs to be running as a user that has write access to that folder. Prefixing the command with sudo will ensure this happens.ctt
npm ERR! addLocal Could not install /home/chaitanya npm ERR! Linux 4.15.0-33-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! code EISDIR npm ERR! errno -21 npm ERR! syscall read npm ERR! eisdir EISDIR: illegal operation on a directory, read npm ERR! eisdir This is most likely not a problem with npm itself npm ERR! eisdir and is related to npm not being able to find a package.json in npm ERR! eisdir a package you are trying to install.Chaitanya Rajeev

1 Answers

-1
votes

sudo npm install  -g ethereumjs-testrpc You have to run this command as superuser otherwise it won't run . because it's trying to accessed your filesystem.