Truffle: Truffle fails to install with latest Nodejs

Created on 11 May 2017  路  11Comments  路  Source: trufflesuite/truffle

  • [ ] I've asked for help in the Truffle Gitter before filing this issue.

Issue

Cannot install Truffle via npm install -g truffle command

Steps to Reproduce

  1. Latest Node js v7.10.0 and npm v3.10.6 is installed on my system (Win 8.1).
  2. Issued npm install -g truffle command
  3. Install fails with issue - Failed at the [email protected] install script 'node-gyp rebuild'.

Expected Behavior

Expected to install the latest truffle globally using npm

Actual Results

\npm-cli.js" "install" "-g" "truffle"
npm ERR! node v7.10.0
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sha3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sha3
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sha3
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\dilip.r02\npm-debug.log
npm ERR! code 1

Environment

  • Operating System: Win 8.1
  • Truffle version: v3.2.2
  • node version: v7.10.0
  • npm version: v3.10.6

Most helpful comment

try "npm install [email protected] -g"
for me it worked today
the 3.2.2 version has some issues right now so go for the 3.2.1

All 11 comments

try "npm install [email protected] -g"
for me it worked today
the 3.2.2 version has some issues right now so go for the 3.2.1

Thanks Treste91

Good call @treste91 , thanks!

Does upgrading your node version help? https://github.com/trufflesuite/truffle/issues/413#issuecomment-305923926

Hi there. A new beta has been pushed out that should fix this issue. Details in the blog post here. Can you give it a shot and report back?

ran into the same issue today, the suggestion from Treste91 worked for me

On Window, I used GitBash, first ran npm install --global --production windows-build-tools, then opened gitbash as an Administrator and ran the suggestion from Treste91... and voila, 6 hours since starting install, you should have a nice truffle command line

Please read the blog post for a quick, issue free installation on Windows:

http://truffleframework.com/blog/how-were-making-installation-issues-a-thing-of-the-past

Per the blog post, truffle (beta) has successfully installed for me on Win7 with Python 2.7 using npm:
$ npm install -g truffle@beta

We've released a new version of Truffle making beta officially released to production. Closing this ticket. Thanks all!

I had a similar problem. I ran npm i -g truffle and then when I tried to run truffle init I got an error: zsh: command not found: truffle. What solved it for me is to create a local node_modules with truffle installed in it, and then run that copy.

  1. run npm init and make a new npm project
  2. run npm i truffle
  3. run ./node_modules/.bin/truffle init and it should work!
Was this page helpful?
0 / 5 - 0 ratings