Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSX : npm install error #168

Closed
willy20040711 opened this issue Sep 2, 2017 · 1 comment
Closed

OSX : npm install error #168

willy20040711 opened this issue Sep 2, 2017 · 1 comment

Comments

@willy20040711
Copy link

I follow the guideline for installing t2-cli, but it seem my Mac OS X system can't complete the install of t2-cli.
Do I need to change the version of node?

`LabFnPdeMacBook-Pro:~ labfnp$ node -v
v8.4.0
LabFnPdeMacBook-Pro:~ labfnp$ npm -v
5.3.0
LabFnPdeMacBook-Pro:~ labfnp$ npm install -g t2-cli
/usr/local/bin/t2 -> /usr/local/lib/node_modules/t2-cli/bin/tessel-2.js
/usr/local/bin/cargo-tessel -> /usr/local/lib/node_modules/t2-cli/bin/cargo-tessel.js

usb@1.2.0 install /usr/local/lib/node_modules/t2-cli/node_modules/usb
node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok
node-pre-gyp verb cli [ '/usr/local/bin/node',
node-pre-gyp verb cli '/usr/local/lib/node_modules/t2-cli/node_modules/usb/node_modules/.bin/node-pre-gyp',
node-pre-gyp verb cli 'install',
node-pre-gyp verb cli '--fallback-to-build' ]
node-pre-gyp info using node-pre-gyp@0.6.30
node-pre-gyp info using node@8.4.0 | darwin | x64
node-pre-gyp verb command install []
node-pre-gyp info check checked for "/usr/local/lib/node_modules/t2-cli/node_modules/usb/src/binding/usb_bindings.node" (not found)
node-pre-gyp http GET https://github.com/tessel/node-usb/releases/download/1.2.0/usb_bindings-v1.2.0-node-v57-darwin-x64.tar.gz
node-pre-gyp http 404 https://github.com/tessel/node-usb/releases/download/1.2.0/usb_bindings-v1.2.0-node-v57-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download: https://github.com/tessel/node-usb/releases/download/1.2.0/usb_bindings-v1.2.0-node-v57-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for usb@1.2.0 and node@8.4.0 (node-v57 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http Pre-built binary not available for your system, looked for https://github.com/tessel/node-usb/releases/download/1.2.0/usb_bindings-v1.2.0-node-v57-darwin-x64.tar.gz
node-pre-gyp verb command build [ 'rebuild' ]
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/anaconda/bin/python" is v3.6.1, 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 (/usr/local/lib/node_modules/node-gyp/lib/configure.js:492:19)
gyp ERR! stack at PythonFinder. (/usr/local/lib/node_modules/node-gyp/lib/configure.js:474:14)
gyp ERR! stack at ChildProcess.exithandler (child_process.js:262: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:545:12)
gyp ERR! System Darwin 16.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/t2-cli/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/usr/local/lib/node_modules/t2-cli/node_modules/usb/src/binding"
gyp ERR! cwd /usr/local/lib/node_modules/t2-cli/node_modules/usb
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/t2-cli/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/usr/local/lib/node_modules/t2-cli/node_modules/usb/src/binding' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/t2-cli/node_modules/usb/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:927:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Darwin 16.6.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/t2-cli/node_modules/usb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/t2-cli/node_modules/usb
node-pre-gyp ERR! node -v v8.4.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/t2-cli/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/usr/local/lib/node_modules/t2-cli/node_modules/usb/src/binding' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! usb@1.2.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the usb@1.2.0 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/labfnp/.npm/_logs/2017-09-02T11_33_47_308Z-debug.log`

@willy20040711
Copy link
Author

Change to the LTS version node, solve above issue.
Sorry to bother.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant