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

npm install, getting node-pre-gyp errors #1651

Closed
faiwudevse opened this issue Jan 21, 2019 · 7 comments
Closed

npm install, getting node-pre-gyp errors #1651

faiwudevse opened this issue Jan 21, 2019 · 7 comments

Comments

@faiwudevse
Copy link

fsevents@1.2.4 install /Users/Fw5/Desktop/Sun Sweet Project/sunsweet-sunbook/node_modules/fsevents
node install

node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.4 and node@11.6.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:188:13)
gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:395:11)
gyp ERR! stack at Socket.emit (events.js:188:13)
gyp ERR! stack at Pipe._handle.close (net.js:610:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/11.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/Fw5/Desktop/Sun Sweet Project/sunsweet-sunbook/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/Fw5/Desktop/Sun Sweet Project/sunsweet-sunbook/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Users/Fw5/Desktop/Sun Sweet Project/sunsweet-sunbook/node_modules/fsevents
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/11.6.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/Fw5/Desktop/Sun Sweet Project/sunsweet-sunbook/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/Fw5/Desktop/Sun Sweet Project/sunsweet-sunbook/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/Fw5/Desktop/Sun Sweet Project/sunsweet-sunbook/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:188:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/11.6.0/bin/node" "/Users/Fw5/Desktop/Sun Sweet Project/sunsweet-sunbook/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/Fw5/Desktop/Sun Sweet Project/sunsweet-sunbook/node_modules/fsevents
node-pre-gyp ERR! node -v v11.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/11.6.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/Fw5/Desktop/Sun Sweet Project/sunsweet-sunbook/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/Fw5/Desktop/Sun Sweet Project/sunsweet-sunbook/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)

@tocker
Copy link

tocker commented Jan 24, 2019

@faiwudevse Most likely you have python 3 in your path. Python 3 is not supported yet.

Verify your python version: python --version.

You'll need to install python 2. Since I see you're on OS-X, you can fix it with the following commands. It should not change your default python version AFAIK.

brew install python2
npx node-gyp --python $(brew --prefix python2)/bin/python

Then re-run npm install.

@ahaverdings
Copy link

Try removing node_modules and package-lock.json and running npm install again, this worked for me.

@rvagg rvagg closed this as completed Jun 20, 2019
@bjm88
Copy link

bjm88 commented Jun 26, 2019

whats eta to support python 3?

@cclauss
Copy link
Contributor

cclauss commented Jun 26, 2019

For Python 3, please review #1793

@Lanskask
Copy link

I was in conda environment with python 3
I leave it to basic environment with python 2
And it works!
Thanks for your advices!

@rishabh-rohila
Copy link

Try removing node_modules and package-lock.json and running npm install again, this worked for me.

which node or python version are you using for running node gyp

@rishabh-rohila
Copy link

at present time node gyp is showing an error like -
npm ERR! node-pre-gyp ERR! node -v v18.16.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok

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

8 participants