trufflesuite / ganache-cli-archive

Fast Ethereum RPC client for testing and development. See https://github.com/trufflesuite/ganache for current development.
https://www.trufflesuite.com/ganache
MIT License
3.36k stars 695 forks source link

ganache-cli not getting installed on Ubuntu #777

Closed ghost closed 3 years ago

ghost commented 3 years ago

I am getting the following error while trying to install npm install ganache-cli

npm ERR! code ENETUNREACH
npm ERR! errno ENETUNREACH
npm ERR! request to https://registry.npmjs.org/ganache-cli failed, reason: connect ENETUNREACH 2606:4700::6810:1323:443

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/rahul/.npm/_logs/2020-08-15T08_50_50_947Z-debug.log

I executed the following commands in order.

sudo snap install node --classic
sudo npm install -g ganache-cli

Environment

OS : Xubuntu 20.04 Solidity version used : 0.4.24 Node js version 12.18.3 npm version : 6.14.6

ghost commented 3 years ago

Okay, I have resolved it by doing the following. npm config set registry http://registry.npmjs.org/

davidmurdoch commented 3 years ago

Just FYI: you should (almost) NEVER install anything from npm with sudo.