node-gyp: Problem with node pre-gyp while npm install firebase

I got a problem when trying to execute the following instruction in my Angular project :

npm install firebase --save

Here is the result I obtain :

> grpc@1.22.2 install C:\Users\jhardouineau\Documents\Formation\OpenClassrooms\Angular\bookshelves\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 grpc@1.22.2 and node@10.13.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error connect ETIMEDOUT 104.28.22.74:443
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT 104.20.22.46:443
gyp ERR! stack     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jhardouineau\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\jhardouineau\\Documents\\Formation\\OpenClassrooms\\Angular\\bookshelves\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\jhardouineau\\Documents\\Formation\\OpenClassrooms\\Angular\\bookshelves\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64" "--python=C:\\Python27" "--msvs_version=2017"
gyp ERR! cwd C:\Users\jhardouineau\Documents\Formation\OpenClassrooms\Angular\bookshelves\node_modules\grpc
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v5.0.2
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:\Users\jhardouineau\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Users\jhardouineau\Documents\Formation\OpenClassrooms\Angular\bookshelves\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\jhardouineau\Documents\Formation\OpenClassrooms\Angular\bookshelves\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64 --python=C:\Python27 --msvs_version=2017' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\jhardouineau\Documents\Formation\OpenClassrooms\Angular\bookshelves\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jhardouineau\\Documents\\Formation\\OpenClassrooms\\Angular\\bookshelves\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd C:\Users\jhardouineau\Documents\Formation\OpenClassrooms\Angular\bookshelves\node_modules\grpc
node-pre-gyp ERR! node -v v10.13.0
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\jhardouineau\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Users\jhardouineau\Documents\Formation\OpenClassrooms\Angular\bookshelves\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\jhardouineau\Documents\Formation\OpenClassrooms\Angular\bookshelves\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown --napi_version=3 --node_abi_napi=napi
--napi_build_version=0 --node_napi_label=node-v64 --python=C:\Python27 --msvs_version=2017' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\karma\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\@angular\compiler-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.22.2 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.22.2 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\jhardouineau\AppData\Roaming\npm-cache\_logs\2019-07-23T12_09_45_790Z-debug.log

I tried different solutions but nothing worked, maybe I missed something, let me know if you can help,

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 32 (6 by maintainers)

Most upvoted comments

Hi! I solved problem with firebase. Thanks this guy Dmitriy Kashirin on this russian page page . He recomended to install python 2.7 with next command npm install --global --production windows-build-tools

and then, it is really important, execute next command (in windows) setx PYTHON "%USERPROFILE%\.windows-build-tools\python27\python.exe"

after 3 days of search… ta-da-da-dam… I have working firebase.

Thanks a lot to Dmitriy. Please, say “Thanks” to him personally

I had the same problem But after I ran npm install grpc --verbose it outputed OK Then firebase installed successfully

Hey guys, I don’t know if it helps any of you, but after some research, I fixed it by upgrading to the latest version of firebase.

Using

"firebase": "^7.8.2"

had me off the hook (dragging my feet on macOS 10.14.6, yarn 1.19.2, and node v13.2.0)

This answer helped me. So I just downgraded node (with nvm) and it worked!

Hi, @Raunakkmrr I could fix this error with downgrading the node version to 10.16.0 in Ubuntu 19.10!