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

Build failed with error code: 7 #2095

Closed
Godbother opened this issue Apr 7, 2020 · 3 comments
Closed

Build failed with error code: 7 #2095

Godbother opened this issue Apr 7, 2020 · 3 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

@Godbother
Copy link

gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
gyp ERR! stack at onErrorNT (internal/child_process.js:456:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_global\node_modules\angular-cli\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Program Files\nodejs\node_global\node_modules\angular-cli\node_modules\node-sass
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! This is a bug in node-gyp.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! https://github.com/nodejs/node-gyp/issues
Build failed with error code: 7
npm WARN @angular/core@2.4.10 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\angular-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.13.1 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.13.1 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:\Program Files\nodejs\node_cache_logs\2020-04-07T13_45_30_845Z-debug.log

excuse me, there is a error when i was installing the angular/cli . I saw it requires a peer of rxjs@5.0.1 and i installed it. But it still fail to install the angular/cli. Please give me some help,thanks a lot.

@Godbother
Copy link
Author

excuse me, there is a error when i was installing the angular/cli . I saw it requires a peer of rxjs@5.0.1 and i installed it. But it still fail to install the angular/cli. Please give me some help,thanks a lot.

@richardlau
Copy link
Member

gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
gyp ERR! stack at onErrorNT (internal/child_process.js:456:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_global\node_modules\angular-cli\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Program Files\nodejs\node_global\node_modules\angular-cli\node_modules\node-sass
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v3.8.0

Support for Visual Studio 2019 was added in node-gyp v5 and the error log shows an older version, v3.8.0, being used. The logs also show node-sass is being used and that has a dependency on the older version of node-gyp so you'll need to work with them on how to use a later version of node-gyp (perhaps you can start from sass/node-sass#2868).

@cclauss
Copy link
Contributor

cclauss commented Apr 7, 2020

Richard, What is the quickest and surest way to upgrade node-gyp? #1753 (comment)

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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

3 participants