npm install ganache -g failed | Ubuntu 21.10 | node -v v18.0.0 npm -v 8.8.0
See original GitHub issueHello @trufflesuite
i am trying to install ganache on ubuntu with the following
npm install ganache --global
i got this errors:
user@ubuntu~$ npm install ganache --global
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/ganache
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ganache'
npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ganache'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/ganache'
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.
i search online that on linux you have to use:
$ sudo npm install ganache --global
but for obv reasons, installing npm package with sudo
privileges, is not a best practice
but this means that i change node_module folder parameters/variables and it could be dangerous for security reason. Am I correct?
Machine Config:
Distributor ID: Ubuntu
Description: Ubuntu 21.10
Release: 21.10
Codename: impish
node -v
v18.0.0
npm -v
8.8.0
How can i fix this? Thanks
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
ganache - npm
A tool for creating a local blockchain for fast Ethereum development. Features • Getting Started • Documentation • Community • Docker ...
Read more >npm global install of ganache-cli fails (because of sudo ...
The basic problem is that globally installing packages with npm links them into directories under /usr/local/ , which are typically owned by ...
Read more >I Run Ganachecli And It Returned Me Error. I'Ve Reinstall Npm ...
It seems you have a permission issue with your nodejs installation.You can either use 'sudo npm install' command or use some node version...
Read more >install nodejs and npm on ubuntu 21.10, install sucessful but ...
I am new to js and wanted to install nodejs LTS version and npm on ubuntu 21.10.
Read more >Unable to install Ganache - Ethereum Stack Exchange
command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild npm ERR! gyp info it worked if it ends ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ganache GUI and ganache, the command line package, are different things (GUI uses its own ganache cli instance internally based on ganache v6)
Was my last answer to this question not sufficient?
Note: official Node 18 support will be in the next release. Try Node 16.