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

GYP error during build using npm i #4

Closed
shafay07 opened this issue Feb 23, 2019 · 3 comments
Closed

GYP error during build using npm i #4

shafay07 opened this issue Feb 23, 2019 · 3 comments

Comments

@shafay07
Copy link

gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Anacoda3\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", 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:189:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\GitHub test\tensorflow-image-recognition-chrome-extension-master\node_modules\deasync
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed
npm WARN tensorflow-image-recognition-chrome-extension@0.1.0 No repository field.
npm WARN tensorflow-image-recognition-chrome-extension@0.1.0 license should be a valid SPDX license expression
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.0 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.0: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! deasync@0.1.12 install: `node ./build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the deasync@0.1.12 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!     C:\Users\Shafay Haseeb\AppData\Roaming\npm-cache\_logs\2019-02-23T22_18_51_957Z-debug.log
@shafay07
Copy link
Author

After running an intensive google search, i found out gyp isnt supported with python 3.x , could u let me know if u used python 2.x or 3.x and if u know a workaround this issue?

I am working on a similar project for my Final year degree project. Any help would be much appreciated.
Thanks

@Isetnt2
Copy link

Isetnt2 commented Feb 24, 2019

This is built using JavaScript and not python that's why you get errors when trying to build. NPM is a package manager for node.js.

@shafay07
Copy link
Author

shafay07 commented Feb 24, 2019

I understand its node js. I had issues with npm since gyp supports python 2. This helped me, i had to downgrade to 2.7. Maybe it can help someone in future :)

#nodejs/node-gyp#1528 (comment)

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

2 participants