The problem occurs when doing npm install of a project.
Angular CLI: 1.7.4
Node: 9.2.0
OS: win32 x64
Windows 10
Angular: 5.0.3
... animations, common, compiler, core, forms, http
... platform-browser, platform-browser-dynamic, router
@angular/cli: 1.7.4
@angular/compiler-cli: 5.2.11
@angular/language-service: 5.2.11
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.5.3
webpack: 3.11.0
npm:6.5.0
I attach the result and log
error completo.txt
2019-01-04T20_35_36_697Z-debug.log
E:\TFStudio\Repos\idepWeb\node_modules\grpc\build\Release\\libz.lib
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Emilse\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:159:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Emilse\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=E:\\TFStudio\\Repos\\idepWeb\\node_modules\\grpc\\src\\node\\extension_binary\\node-v59-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=E:\\TFStudio\\Repos\\idepWeb\\node_modules\\grpc\\src\\node\\extension_binary\\node-v59-win32-x64-unknown" "--node_abi_napi=node-v59" "--napi_build_version=0" "--node_napi_label=node-v59"
gyp ERR! cwd E:\TFStudio\Repos\idepWeb\node_modules\grpc
gyp ERR! node -v v9.2.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 'C:\Program Files (x86)\nodejs\node.exe C:\Users\Emilse\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=E:\TFStudio\Repos\idepWeb\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=E:\TFStudio\Repos\idepWeb\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64-unknown --node_abi_napi=node-v59 --napi_build_version=0 --node_napi_label=node-v59' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (E:\TFStudio\Repos\idepWeb\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:159:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:943:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "E:\\TFStudio\\Repos\\idepWeb\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd E:\TFStudio\Repos\idepWeb\node_modules\grpc
node-pre-gyp ERR! node -v v9.2.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Users\Emilse\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=E:\TFStudio\Repos\idepWeb\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=E:\TFStudio\Repos\idepWeb\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64-unknown --node_abi_napi=node-v59 --napi_build_version=0 --node_napi_label=node-v59' (1)
npm WARN [email protected] requires a peer of @angular/animations@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/common@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/platform-browser@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] 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] install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\Emilse\AppData\Roaming\npm-cache\_logs\2019-01-04T20_24_52_759Z-debug.log
It looks like you have an issue connecting to our hosting website for the precompiled binaries, and the installation is fallbacking on building from sources as a result.
Unfortunately, building from sources under Windows is fairly painful. It'd be better if you could try and diagnose why the download of the precompiled binaries failed.
They are at node-precompiled-binaries.grpc.io and you can browse all the them at https://console.cloud.google.com/storage/browser/node-precompiled-binaries.grpc.io/grpc
Parece que tienes un problema al conectarte a nuestro sitio web de hosting para los archivos binarios precompilados, y la instalación está resaltando en la construcción de fuentes como resultado.
Desafortunadamente, construir desde fuentes bajo Windows es bastante doloroso. Sería mejor si pudiera intentar y diagnosticar por qué falló la descarga de los archivos binarios precompilados.
Están en node-precompiled-binaries.grpc.io y puede examinarlos todos en https://console.cloud.google.com/storage/browser/node-precompiled-binaries.grpc.io/grpc
Then there is no solution for windows users?
The Windows users should use the precompiled binaries. Most of our Windows users are able to use grpc properly with the installation script downloading the appropriate binary automatically. The fact you're having troubles downloading from our website means something is wrong with your network or your computer, but it's on you to troubleshoot it first. If there are changes we need to do on our hosting to make it work for more people, we'll gladly do them, but we can't fix problems if we don't know what they are.
EDIT: I ran this again now, on another network. I suspect it might be the Cisco content filter at home kidding with me. I tried to open http://104.28.22.74/ in the browser at home, and got a denial from Cisco because "the site was known to contain adult material" or whatever, I don't recall the exact reason. Tried https as well, but got timeout, so I thought that wasn't blocked. Since it seems to be no problem on office network (which actually denies a lot of sites), I assume it might be a network issue in my router at home.
On the other hand, I believe that the source compile should have worked too.
ORIGINAL POST:
I seem to get the same error. I'm on linux, fedora 29. Running npm 6.5.0, node v11.7.0 (controlled by fnm – fish node manager), but tried a lot of lower node versions as well (latest 10.x, latest 9.x and 8.5) without success.
The npm module that relies on grpc in my case is firebase. I tried first with yarn, then npm. Removed npm, reinstalled. Once it suddenly worked, after I installed node-gyp globally and node-pre-gyp both global and locally, I think, but when I ran npm install again, it failed. Tried to upgrade all modules in package.json, but no luck.
$npm install firebase
> [email protected] install /home/awe/prosjekt/tr/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v67 ABI,glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error connect ETIMEDOUT 104.28.22.74:443
make: Entering directory '/home/awe/prosjekt/tr/node_modules/grpc/build'
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
......
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/ext/transport/chttp2/transport/flow_control.o
../deps/grpc/src/core/ext/transport/chttp2/transport/flow_control.cc: In member function ‘virtual uint32_t grpc_core::chttp2::TransportFlowControl::MaybeSendUpdate(bool)’:
../deps/grpc/src/core/ext/transport/chttp2/transport/flow_control.cc:193:50: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
static_cast<const uint32_t>(target_window());
^
cc1plus: all warnings being treated as errors
make: *** [grpc.target.mk:478: Release/obj.target/grpc/deps/grpc/src/core/ext/transport/chttp2/transport/flow_control.o] Error 1
make: Leaving directory '/home/awe/prosjekt/tr/node_modules/grpc/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/awe/.config/fnm/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:188:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.20.3-200.fc29.x86_64
gyp ERR! command "/home/awe/.config/fnm/bin/node" "/home/awe/.config/fnm/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/awe/prosjekt/tr/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/awe/prosjekt/tr/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v67"
gyp ERR! cwd /home/awe/prosjekt/tr/node_modules/grpc
gyp ERR! node -v v11.7.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 '/home/awe/.config/fnm/bin/node /home/awe/.config/fnm/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/awe/prosjekt/tr/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/awe/prosjekt/tr/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v67' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/awe/prosjekt/tr/node_modules/grpc/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 Linux 4.20.3-200.fc29.x86_64
node-pre-gyp ERR! command "/home/awe/.config/fnm/bin/node" "/home/awe/prosjekt/tr/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /home/awe/prosjekt/tr/node_modules/grpc
node-pre-gyp ERR! node -v v11.7.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/home/awe/.config/fnm/bin/node /home/awe/.config/fnm/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/awe/prosjekt/tr/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/awe/prosjekt/tr/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v67' (1)
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":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /home/awe/.npm/_logs/2019-01-24T00_16_59_557Z-debug.log
Initially I got some SSL version deprecated messages when it tried to build the module, but I haven't been able to reproduce that.
I checked the log file that is mentioned in the end, but can't find anything meaningful there. Here is an extract:
69 silly pacote version manifest for [email protected] fetched in 1ms
70 silly resolveWithNewModule [email protected] checking installable status
71 http fetch GET 304 https://registry.npmjs.org/grpc 30ms (from cache)
72 silly pacote version manifest for [email protected] fetched in 31ms
73 silly resolveWithNewModule [email protected] checking installable status
74 silly tarball trying https://registry.npmjs.org/grpc/-/grpc-1.17.0.tgz by hash: sha512-5zb5ilwHlsiWfE2Abq/IN5SkHQ2zi4QF/u9Gewcw5DO3y+hGTtzZUiMK52MX3YZHAIRjqxDcO3fx0jLhPjT8Zw==
75 silly extract https://registry.npmjs.org/grpc/-/grpc-1.17.0.tgz extracted to /tmp/npm-26506-16004953/unpack-f5a057b8 (579ms)
76 silly addBundled read tarball
77 silly cleanup remove extracted module
78 http fetch GET 304 https://registry.npmjs.org/@firebase%2fwebchannel-wrapper 838ms (from cache)
79 silly pacote version manifest for @firebase/[email protected] fetched in 850ms
80 silly resolveWithNewModule @firebase/[email protected] checking installable status
and later
1739 silly extract [email protected] extracted to /home/awe/prosjekt/tr/node_modules/.staging/grpc-84051359 (816ms)
The error comes in the very end of the log file
2919 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {
"os":"linux","arch":"x64"})
2920 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
2920 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
2920 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
2920 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
2921 verbose stack Error: [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
2921 verbose stack Exit status 1
2921 verbose stack at EventEmitter.<anonymous> (/home/awe/.config/fnm/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
2921 verbose stack at EventEmitter.emit (events.js:188:13)
2921 verbose stack at ChildProcess.<anonymous> (/home/awe/.config/fnm/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
2921 verbose stack at ChildProcess.emit (events.js:188:13)
2921 verbose stack at maybeClose (internal/child_process.js:978:16)
2921 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
2922 verbose pkgid [email protected]
2923 verbose cwd /home/awe/prosjekt/tr
2924 verbose Linux 4.20.3-200.fc29.x86_64
2925 verbose argv "/home/awe/.config/fnm/bin/node" "/home/awe/.config/fnm/bin/npm" "install" "firebase"
2926 verbose node v11.7.0
2927 verbose npm v6.5.0
2928 error code ELIFECYCLE
2929 error errno 1
2930 error [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
2930 error Exit status 1
2931 error Failed at the [email protected] install script.
2931 error This is probably not a problem with npm. There is likely additional logging output above.
2932 verbose exit [ 1, true ]
A solution to solve this will be greatly appreciated!
@aweibell did it work out? i am stuck in same issue
@aweibell did it work out? i am stuck in same issue
For some reason it worked back then, but yesterday I got the same error again, on another project. This time it helped to update the libraries depending on grpc, which made the grpc dependency jump from 1.16.x to 1.18.0. Perhaps you should try a newer grpc version?
is there a solution for this?
Got an error message after upgrading node telling me to run npm rebuild. As is documented, the build doesn't work. It seems binaries are not built for older versions of grpc and the latest versions of node either, so ultimately what I had to do was bump grpc to latest and it found the binary for my node version, back in business.
This answer helped me. So I just downgraded node (with nvm) and it worked!
Deleting unused firebase modules worked for me.
which firebase modules did you delete? @bgavas
@SamiChab What version of npm did you downgrade too?
@FutureHits3Dev I deleted
"firebase": "^5.8.3",
"firebase-admin": "^8.6.1",
"firebase-functions": "^3.3.0",
"firebaseauth": "^1.0.0"
But I think the error is caused by firebase-functions
@bgavas I got everything to work again. I just downgraded node to 11.x and everything worked perfectly. But yes, it's firebase functions that screwing us. thanks for the help.
@FutureHits3Dev I downgraded npm to v12.4.0
npm install --save node-pre-gyp in the problematic project works - you essentially have to treat it like a peer dependency because of the compilation difficulties on Windows.
This is what people are referring to by "use the pre-compiled binaries" as well :)
I deleted everything in my ./node_modules folder, removed firebase from my package.json file, and I ran npm i again. That fixed my issue with this.
npm install --save node-pre-gypin the problematic project works - you essentially have to treat it like a peer dependency because of the compilation difficulties on Windows.This is what people are referring to by "use the pre-compiled binaries" as well :)
This helped me also..
downgrading node to v11 worked
downgrading node to v11 worked
I changed node to 10.16.3, also worked.
It failed at 12.12.0 before.
downgrading node to v11 worked
I changed node to 10.16.3, also worked.
It failed at 12.12.0 before.
Work fine with node 10.16.3
Worked at 10.16.3 too.
The problem occurred when adding firebase to an expo app i was building. grpc was failing to build. The node version installed was 14.4.0.
I used nvm-windows and installed node v12.16.0 and tried adding firebase again and it got installed flawlessly in seconds!
The problem occurred when adding firebase to an expo app i was building. grpc was failing to build. The node version installed was 14.4.0.
I used nvm-windows and installed node v12.16.0 and tried adding firebase again and it got installed flawlessly in seconds!
I am using Node v12.16.0 still getting this error while installing firebase
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:310:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=G:\Coursera\Coursera Full Stack\React\conFusion-React-Firebase\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown\grpc_node.node" "--module_name=grpc_node" "--module_path=G:\Coursera\Coursera Full Stack\React\conFusion-React-Firebase\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd G:\Coursera\Coursera Full Stack\React\conFusion-React-Firebase\node_modules\grpc
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=G:\Coursera\Coursera Full Stack\React\conFusion-React-Firebase\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=G:\Coursera\Coursera Full Stack\React\conFusion-React-Firebase\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:310:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Windows_NT 10.0.18362
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "G:\Coursera\Coursera Full Stack\React\conFusion-React-Firebase\node_modules\grpc\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd G:\Coursera\Coursera Full Stack\React\conFusion-React-Firebase\node_modules\grpc
node-pre-gyp ERR! node -v v12.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=G:\Coursera\Coursera Full Stack\React\conFusion-React-Firebase\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=G:\Coursera\Coursera Full Stack\React\conFusion-React-Firebase\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.3 (node_modules\sane\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 WARN notsup Unsupported engine for [email protected]: wanted: {"node":"<8.10.0"} (current: {"node":"12.16.3","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\chokidar\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 WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I am getting the same error when running npm install for a project file. There was a huge console log but these are the major parts of the output
../deps/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.cc: In function ‘grpc_error* try_http_parsing(grpc_chttp2_transport*)’:
../deps/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.cc:2466:40: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘grpc_http_response’ {aka ‘struct grpc_http_response’}; use assignment or value-initialization instead [-Werror=class-memaccess]
2466 | memset(&response, 0, sizeof(response));
| ^
In file included from ../deps/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.cc:44:
../deps/grpc/src/core/lib/http/parser.h:71:16: note: ‘grpc_http_response’ {aka ‘struct grpc_http_response’} declared here
71 | typedef struct grpc_http_response {
| ^~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make: *** [grpc.target.mk:496: Release/obj.target/grpc/deps/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.o] Error 1
make: Leaving directory '/home/razor/main/Requestly/requestly-master/app/node_modules/grpc/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.4.0-7634-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/razor/main/Requestly/requestly-master/app/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/razor/main/Requestly/requestly-master/app/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /home/razor/main/Requestly/requestly-master/app/node_modules/grpc
gyp ERR! node -v v12.18.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/razor/main/Requestly/requestly-master/app/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/razor/main/Requestly/requestly-master/app/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/razor/main/Requestly/requestly-master/app/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Linux 5.4.0-7634-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/razor/main/Requestly/requestly-master/app/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /home/razor/main/Requestly/requestly-master/app/node_modules/grpc
node-pre-gyp ERR! node -v v12.18.1
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/razor/main/Requestly/requestly-master/app/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/razor/main/Requestly/requestly-master/app/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/karma/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
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":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /home/razor/.npm/_logs/2020-07-31T02_04_31_133Z-debug.log
OS: Pop!_OS 20.04 LTS
node --version : v12.18.1
'npm -v` : 6.14.5
log_file: 2020-07-31T02_04_31_133Z-debug.log
Windows 10 x64 here with node 14: npm install --save node-pre-gyp did the trick :)
Most helpful comment
npm install --save node-pre-gypin the problematic project works - you essentially have to treat it like a peer dependency because of the compilation difficulties on Windows.This is what people are referring to by "use the pre-compiled binaries" as well :)