question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Command 'truffle unbox react' not working.

See original GitHub issue

With:

  • Linux Fedora 27
  • Node 8.9.4
  • Truffle 4.0.4

And these commands:

mkdir truffle-box-example
cd truffle-box-example
truffle unbox react

I got this weird error:

vjE0FxA= but got sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==. (2069 bytes)
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
make: g++: Command not found
make: *** [keccak.target.mk:113: Release/obj.target/keccak/src/addon.o] Error 127
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/mlima/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.14.11-300.fc27.x86_64
gyp ERR! command "/home/mlima/.nvm/versions/node/v8.9.4/bin/node" "/home/mlima/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/mlima/Projects/truffle-box-example/node_modules/keccak
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keccak@1.4.0 rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the keccak@1.4.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/mlima/.npm/_logs/2018-01-10T18_41_44_213Z-debug.log
make: g++: Command not found
make: *** [copied_files.target.mk:22: Release/obj.target/copied_files.node] Error 127
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/mlima/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.14.11-300.fc27.x86_64
gyp ERR! command "/home/mlima/.nvm/versions/node/v8.9.4/bin/node" "/home/mlima/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/mlima/Projects/truffle-box-example/node_modules/scrypt
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN The package dotenv is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the scrypt@6.0.3 install 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!     /home/mlima/.npm/_logs/2018-01-10T18_41_47_599Z-debug.log

    at ChildProcess.exithandler (child_process.js:275:12)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

Any ideas?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:7

github_iconTop GitHub Comments

1reaction
yyssjj33commented, Mar 22, 2018

same here on Mac, must be something wrong with my default python version

I fix it by setting my default python version back to 2.7(https://stackoverflow.com/a/38806058)

the reason is node-gyp only support python2

@matheusml I think your problem maybe due to make or gcc

➜  tuffle-play truffle unbox react
Downloading...
Unpacking...
Setting up...
Error: Command failed: npm install
npm WARN deprecated ethereumjs-testrpc@2.2.7: ethereumjs-testrpc has been renamed to ganache-cli, please use this package from now on.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/usr/local/bin/python" is v3.6.4, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at PythonFinder.failPythonVersion (/Users/jiyang/.nvm/versions/node/v8.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:492:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/Users/jiyang/.nvm/versions/node/v8.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:474:14)
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:263:7)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:927:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:348:11)
gyp ERR! stack     at emitOne (events.js:115:13)
gyp ERR! stack     at Socket.emit (events.js:210:7)
gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:547:12)
gyp ERR! System Darwin 16.5.0
gyp ERR! command "/Users/jiyang/.nvm/versions/node/v8.6.0/bin/node" "/Users/jiyang/.nvm/versions/node/v8.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jiyang/blockchain/payroll-play/node_modules/keccak
gyp ERR! node -v v8.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keccak@1.4.0 rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the keccak@1.4.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jiyang/.npm/_logs/2018-03-22T05_48_54_025Z-debug.log
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/usr/local/bin/python" is v3.6.4, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at PythonFinder.failPythonVersion (/Users/jiyang/.nvm/versions/node/v8.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:492:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/Users/jiyang/.nvm/versions/node/v8.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:474:14)
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:263:7)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:927:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:348:11)
gyp ERR! stack     at emitOne (events.js:115:13)
gyp ERR! stack     at Socket.emit (events.js:210:7)
gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:547:12)
gyp ERR! System Darwin 16.5.0
gyp ERR! command "/Users/jiyang/.nvm/versions/node/v8.6.0/bin/node" "/Users/jiyang/.nvm/versions/node/v8.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jiyang/blockchain/payroll-play/node_modules/scrypt
gyp ERR! node -v v8.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN The package dotenv is included as both a dev and production dependency.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt@6.0.3 install 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/jiyang/.npm/_logs/2018-03-22T05_48_55_897Z-debug.log

    at ChildProcess.exithandler (child_process.js:271:12)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:927:16)
    at Socket.stream.socket.on (internal/child_process.js:348:11)
    at emitOne (events.js:115:13)
    at Socket.emit (events.js:210:7)
    at Pipe._handle.close [as _onclose] (net.js:547:12)
0reactions
karadikidcommented, Jun 6, 2019

Truffle unbox drizzle fails. Issue:

56619 verbose pkgid scrypt@6.0.3 56620 verbose cwd /Users/karadi/Developer/drizzle/app 56621 verbose Darwin 18.6.0 56622 verbose argv "/Users/karadi/.nvm/versions/node/v10.16.0/bin/node" "/Users/karadi/.nvm/versions/node/v10.16.0/bin/npm" "install" 56623 verbose node v10.16.0 56624 verbose npm v6.9.0 56625 error code ELIFECYCLE 56626 error errno 1 56627 error scrypt@6.0.3 install: node-gyp rebuild 56627 error Exit status 1 56628 error Failed at the scrypt@6.0.3 install script. 56628 error This is probably not a problem with npm. There is likely additional logging output above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Truffle Unbox React Error · Issue #3112 - GitHub
It looks like unboxing is failing on the npm ci command because you're using npm 5.6.0 and npm ci didn't exist until 5.7.0....
Read more >
Error in unboxing truffle-react on Windows
Run command prompt as administrator; npm install --global--production windows-build-tools; npm install --global node-gyp ... truffle compile truffle migrate.
Read more >
Truffle Unbox Error while using truffle unbox react
Failed at the scrypt@6.0.3 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above....
Read more >
React Truffle Box
Run the unbox command using 1 of 2 ways. # Install Truffle globally and run `truffle unbox` $ npm install -g truffle $...
Read more >
React Truffle Box - Start using smart contracts from a react app
First ensure you are in a new and empty directory. Run the unbox command via npx and skip to step 3. This will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found