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 ERR! configure error #2069

Closed
faiwiz opened this issue Mar 12, 2020 · 16 comments
Closed

gyp ERR! configure error #2069

faiwiz opened this issue Mar 12, 2020 · 16 comments
Labels
ERR! node-gyp -v < v10.x.x npm install -g npm Node Sass --> Dart Sass https://github.com/sass/node-sass/issues/2952

Comments

@faiwiz
Copy link

faiwiz commented Mar 12, 2020

λ npm install

[email protected] install C:\var\www\project-dir\node_modules\node-sass
node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.

  export HTTP_PROXY=http://example.com:1234                                                                                                                                                                                                          

or configure npm proxy via

  npm config set proxy http://example.com:8080                                                                                                                                                                                                       

[email protected] postinstall C:\var\www\project-dir\node_modules\node-sass
node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\var\www\project-dir\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'C:\Program Files\nodejs\node.exe',
gyp verb cli 'C:\var\www\project-dir\node_modules\node-gyp\bin\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "C:\Python37\python.exe" in the PATH
gyp verb which succeeded C:\Python37\python.exe C:\Python37\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Python37\python.exe -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:297:12)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\var\www\project-dir\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\var\www\project-dir\node_modules\node-sass
gyp ERR! node -v v12.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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\UserName\AppData\Roaming\npm-cache_logs\2020-03-12T13_15_02_615Z-debug.log

λ npm -v
6.14.2

λ node -v
v12.6.0

@cclauss
Copy link
Contributor

cclauss commented Mar 12, 2020

node-gyp -v v3.8.0
gyp ERR! not ok
https://github.com/nodejs/node-gyp/releases

@cclauss cclauss closed this as completed Mar 12, 2020
@faiwiz
Copy link
Author

faiwiz commented Mar 12, 2020

node-gyp -v v3.8.0
gyp ERR! not ok
https://github.com/nodejs/node-gyp/releases

I didn't get your point, what are you trying to say.

@cclauss
Copy link
Contributor

cclauss commented Mar 12, 2020

node-gyp v3.8.0 vs. the current v6.1.0

@faiwiz
Copy link
Author

faiwiz commented Mar 12, 2020

I have upgraded it via https://github.com/nodejs/node-gyp/wiki/Updating-npm's-bundled-node-gyp

λ npm install -g node-gyp@latest
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
C:\Users\UserName\AppData\Roaming\npm\node-gyp -> C:\Users\UserName\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js

then I run again same command npm install
but it's still showing following error gyp ERR! node-gyp -v v3.8.0

@faiwiz
Copy link
Author

faiwiz commented Mar 12, 2020

@cclauss Thanks for help, issue solved by deleting the node_modules directory and package-lock.json, then run command npm install.

@thaycacac
Copy link

npm install -g --unsafe-perm node-sass --save work for me

@cclauss cclauss added ERR! node-gyp -v < v10.x.x npm install -g npm Node Sass --> Dart Sass https://github.com/sass/node-sass/issues/2952 labels Jul 3, 2020
@G-370
Copy link

G-370 commented Aug 4, 2020

Oh yes, deleting package.lock and re-running npm install does it.
But I also had to have python2 installed and in the path.

@cclauss
Copy link
Contributor

cclauss commented Aug 5, 2020

I also had to have python2 installed and in the path.

You can force the use of a particular version with the --python command line option.

@nessKenya
Copy link

@cclauss thanks,
It worked! Is there an article that explains the issue in details.

@bpgould
Copy link

bpgould commented Jan 10, 2021

@cclauss Thanks for help, issue solved by deleting the node_modules directory and package-lock.json, then run command npm install.

This worked for me as well. 1/9/21.

@SowmyaJayaraaman13
Copy link

@cclauss Thanks for help, issue solved by deleting the node_modules directory and package-lock.json, then run command npm install.

This worked for me

@RihardXXX
Copy link

Thanks guy

@CasualEngineerZombie
Copy link

CasualEngineerZombie commented May 26, 2021

I have upgraded it via https://github.com/nodejs/node-gyp/wiki/Updating-npm's-bundled-node-gyp

λ npm install -g node-gyp@latest
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
C:\Users\UserName\AppData\Roaming\npm\node-gyp -> C:\Users\UserName\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js

then I run again same command npm install
but it's still showing following error gyp ERR! node-gyp -v v3.8.0

Thanks, mate, this works for me.

@mdforhadsarker
Copy link

I had to downgrade my npm node and @material-ui/core/ then it fixed the issues.

@anthonychen118
Copy link

I have tried deleting node-module folder and package-lock.json and running npm build or upgrade still points to node-gyp v3.8.0, although I have v8.1.0 installed. npm config set node-gyp path does not work either.

Any idea why is this?

@cclauss
Copy link
Contributor

cclauss commented Jul 20, 2021

@nodejs nodejs locked as resolved and limited conversation to collaborators Jul 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ERR! node-gyp -v < v10.x.x npm install -g npm Node Sass --> Dart Sass https://github.com/sass/node-sass/issues/2952
Projects
None yet
Development

No branches or pull requests