0

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

Sinto
  • 3,915
  • 11
  • 36
  • 70
  • 1
    npm install -g needs sudo – raven Aug 28 '18 at 12:09
  • Throwing an error – Chaitanya Rajeev Aug 29 '18 at 11:03
  • @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 Aug 31 '18 at 03:09
  • 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 Sep 01 '18 at 12:20

1 Answers1

-1

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.

0xAnon
  • 847
  • 9
  • 20