Latest 5.0.20 is not installable. Tested on mac and linux. Error is similar:
npm install -g truffle
/usr/local/bin/truffle -> /usr/local/lib/node_modules/truffle/build/cli.bundled.js
[email protected] postinstall /usr/local/lib/node_modules/truffle
node ./scripts/postinstall.js
/usr/local/lib/node_modules/truffle/scripts/postinstall.js:22
throw error;
^
Error: Error while attempting to download and cache solc 0.5.8: Command failed: node ./build/cli.bundled.js obtain --solc=0.5.8
at postinstallObtain (/usr/local/lib/node_modules/truffle/scripts/postinstall.js:13:11)
at Object.<anonymous> (/usr/local/lib/node_modules/truffle/scripts/postinstall.js:20:3)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Function.Module.runMain (module.js:665:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node ./scripts/postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/info/.npm/_logs/2019-06-01T11_57_43_867Z-debug.log
5.0.19 works fine on both systems. 5.0.20 fails on the same 2 systems.
Mac: 10.13.6
npm --version
6.4.1
node --version
v8.7.0
Oops! We'll fix this and get a release out this week. Thanks for pointing this out!
In the meantime, you should be able to get around this by installing Truffle v5.0.19 and then running:
$ truffle obtain --solc=0.5.8
Then you should be able to upgrade to v5.0.20 without problem. But do let us know if that's not the case. Thanks!
I have the same issue, logs are in the link
OS : windows 10
npm -v
6.9.0
node -v
10.16.0
I did what @CruzMolina recommended, but still got the following errors when trying to obtain:
Error: Failed to complete request to: 0.5.8. Are you connected to the internet?
Error: Failed to complete request to: version URLs. Are you connected to the internet?
RequestError: Error: tunneling socket could not be established, cause=connect EHOSTUNREACH 0.0.31.64:80 - Local (10.119.178.191:58763)
I am connected to the internet, behind a corporate proxy, but npm proxies are set up already.
Fix:
Check: $node -v Node Version needs to be v8.9.4 or higher
if true
1) sudo npm install -g [email protected]
Most helpful comment
Fix:
Check:
$node -vNode Version needs to be v8.9.4 or higherif true
1) sudo npm install -g [email protected]