添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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

[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

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

  • [email protected]
    updated 1 package in 7.082s
  • then I run again same command npm install
    but it's still showing following error gyp ERR! node-gyp -v v3.8.0

    cclauss, Ahmed-ShawkyEgy, AnkushMalik, nessKenya, halochg, osama256, JohnSt99, dmaksimov, bpgould, vincent-lee90, and 13 more reacted with thumbs up emoji 2567910, theodore-q, and jemundarain reacted with laugh emoji cclauss, iamonlysaiful, SowmyaJayaraaman13, RihardXXX, 2567910, theodore-q, and abesheknarayan reacted with hooray emoji ashfahan reacted with confused emoji simeon9696, 2567910, tungkimhubt88, and theodore-q reacted with heart emoji cclauss, RihardXXX, bwdk, XkoderFX, 2567910, theodore-q, and vi4hu reacted with rocket emoji All reactions

    @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.

    @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

    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

  • [email protected]
    updated 1 package in 7.082s
  • 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.

    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?