Closed matheusml closed 5 years ago
@matheusml Did you try running npm install ?
@balibou I made an empty folder:
mkdir truffle-box-example
There's no package.json on it.
And then I run truffle-unbox-react
It's not possible to run npm install
on the empty folder.
I have the same error on a x64 Windows.
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)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed, but can be re-opened if further comments indicate that the problem persists. Feel free to tag maintainers if no there is no reply to further comments.
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.
For Windows
I have a solution where we don't have to downgrade the node version and truffle-box react
will be up and running. We will go old school.
Now we have to do two major things, first one is to
compile
&migrate
the smart contracts and the next is to install thenpm
dependencies (becausenpm module
doesn't go in a repo. insteadpackage.json
have all the dependencies required written.)
cd truffle
to go inside the truffle folder in your project structure through the command line(Terminal). Now run truffle develop
, and after that run compile
and migrate
one by one, after all these three commands are successfully executed, exit the terminal.cd ..
to get out of the truffle folder and use cd client
to enter inside the client
folder, now run npm install
.npm start
inside the client folder, your truffle-box + react is configured.
With:
And these commands:
I got this weird error:
Any ideas?