node-pre-gyp: cannot install firebase

if i try to install firebase via npm install firebase --save it shows me

`C:\Projects\reactnative\auth>npm install firebase --save

grpc@1.11.3 install C:\Projects\reactnative\auth\node_modules\grpc node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Completion callback never invoked! node-pre-gyp ERR! System Windows_NT 10.0.17134 node-pre-gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Projects\reactnative\auth\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:\Projects\reactnative\auth\node_modules\grpc node-pre-gyp ERR! node -v v9.10.0 node-pre-gyp ERR! node-pre-gyp -v v0.10.0 node-pre-gyp ERR! This is a bug in node-pre-gy. node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help: node-pre-gyp ERR! https://github.com/mapbox/node-pre-gyp/issues npm ERR! code ELIFECYCLE npm ERR! errno 6 npm ERR! grpc@1.11.3 install: `node-pre-gyp install --fallback-to-build --library=static_library npm ERR! Exit status 6 npm ERR! npm ERR! Failed at the grpc@1.11.3 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\unoeg\AppData\Roaming\npm-cache_logs\2018-05-21T18_44_21_908Z-debug.log`

and if i try to node-pre-gyp install --fallback-to-build --library=static_library it gives me C:\Projects\reactnative\auth>node-pre-gyp install --fallback-to-build --library=static_library node-pre-gyp info it worked if it ends with ok node-pre-gyp info using node-pre-gyp@0.10.0 node-pre-gyp info using node@9.10.0 | win32 | x64 node-pre-gyp ERR! install error node-pre-gyp ERR! stack Error: auth package.json is not node-pre-gyp ready: node-pre-gyp ERR! stack package.json must declare these properties: node-pre-gyp ERR! stack binary.module_name node-pre-gyp ERR! stack binary.module_path node-pre-gyp ERR! stack binary.host node-pre-gyp ERR! stack at validate_config (C:\Users\unoeg\AppData\Roaming\npm\node_modules\node-pre-gyp\lib\util\versioning.js:220:15) node-pre-gyp ERR! stack at Object.module.exports.evaluate (C:\Users\unoeg\AppData\Roaming\npm\node_modules\node-pre-gyp\lib\util\versioning.js:279:5) node-pre-gyp ERR! stack at install (C:\Users\unoeg\AppData\Roaming\npm\node_modules\node-pre-gyp\lib\install.js:182:31) node-pre-gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (C:\Users\unoeg\AppData\Roaming\npm\node_modules\node-pre-gyp\lib\node-pre-gyp.js:52:37) node-pre-gyp ERR! stack at run (C:\Users\unoeg\AppData\Roaming\npm\node_modules\node-pre-gyp\bin\node-pre-gyp:82:30) node-pre-gyp ERR! stack at Object.<anonymous> (C:\Users\unoeg\AppData\Roaming\npm\node_modules\node-pre-gyp\bin\node-pre-gyp:134:1) node-pre-gyp ERR! stack at Module._compile (module.js:649:30) node-pre-gyp ERR! stack at Object.Module._extensions…js (module.js:660:10) node-pre-gyp ERR! stack at Module.load (module.js:561:32) node-pre-gyp ERR! stack at tryModuleLoad (module.js:501:12) node-pre-gyp ERR! System Windows_NT 10.0.17134 node-pre-gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\unoeg\AppData\Roaming\npm\node_modules\node-pre-gyp\bin\node-pre-gyp” “install” “–fallback-to-build” “–library=static_library” node-pre-gyp ERR! cwd C:\Projects\reactnative\auth node-pre-gyp ERR! node -v v9.10.0 node-pre-gyp ERR! node-pre-gyp -v v0.10.0 node-pre-gyp ERR! not ok auth package.json is not node-pre-gyp ready: package.json must declare these properties: binary.module_name binary.module_path binary.host 2018-05-21T18_44_21_908Z-debug.log

maybe i dont get something?

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 20
  • Comments: 36 (4 by maintainers)

Most upvoted comments

Worked for me npm install firebase --force .

@EgorKazachenko 's solution is the one that works for me.

I’m on Windows 10. Node v8.11.3 NPM v5.6.0

Steps to install everything successfully:

  1. Remove node_modules and package-lock.json if they exist. You want to start fresh.
  2. Run npm install.
  3. After install of everything else without an error, run npm install firebase --force.
  4. You will still get node-pre-gyp errors and warnings, but at the end you should see
+ firebase@x.x.x
added x packages in xs
  1. Success!

Possible reasons for issues may include being behind a company proxy and/or firewall.

I just downgraded npm from 12.0.0 to the LTS version (10.15.3 as of today), and it worked! 😁

Note that we’ve published grpc 1.16.1 with the latest fixes from node-pre-gyp and node 11 support.

Well, I had the same problem. I deleted firebase from package.json and run npm install without firebase. Then I installed firebase separately without --force. And it helped.

Node 11 support has been added in grpc 1.16.1. Either downgrade your current node version, wait for firebase to pin to grpc 1.16.1, or forcibly upgrade the grpc dependency using package locks.

Additionally, firebase isn’t yet fully tested under node 11.

Looks like you attempted to run node-pre-gyp install --fallback-to-build --library=static_library from within the C:\Projects\reactnative\auth directory (it would explain the “auth package.json is not node-pre-gyp ready” error message).

What happens if you try the same command but from within the C:\Projects\reactnative\auth\node_modules\grpc directory?

I was able to fix it by simple turn off Kaspersky Antivirus 😃)

Maybe it’s help some1 else.

Same error. Goal: simply running npm i firebase without error. However this simple command invokes node-pre-gyp which fails with the following monstruosity:

PS C:\Users\ninof\me\code\me\client> npm i firebase

> grpc@1.16.0 install C:\Users\ninof\me\code\me\client\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 Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.16.0/node-v67-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for grpc@1.16.0 and node@11.0.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Pre-built binaries not installable for grpc@1.16.0 and node@11.0.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error Connection closed while downloading tarball file
gypgyp ERR! configure error
ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\ninof\AppData\Local\Programs\Python\Python37\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gypgyp  ERR!ERR! stack stack Error: Command failed: C:\Users\ninof\AppData\Local\Programs\Python\Python37\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
   File "<string>", line 1
gyp gypERR!  ERR!stack    File "<string>", line 1
stackgyp     import sys; print "%s.%s.%s" % sys.version_info[:3];
 gypERR!  stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
ERR! gypstack                                 ^
ERR!gyp stack                                 ^
ERR!gyp  stackERR! SyntaxError: invalid syntax
 stackgyp SyntaxError: invalid syntax
 gyp ERR!ERR!  stackstack

gyp gyp ERR!ERR!  stackstack     at ChildProcess.exithandler (child_process.js:289:12)
     at ChildProcess.exithandler (child_process.js:289:12)
gypgyp  ERR!ERR!  stackstack     at ChildProcess.emit (events.js:182:13)
     at ChildProcess.emit (events.js:182:13)
gypgyp  ERR! ERR!stack      at maybeClose (internal/child_process.js:962:16)
stackgyp     at maybeClose (internal/child_process.js:962:16)
 gypERR!  stackERR!     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
 stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
gyp ERR!gyp  SystemERR! Windows_NT 10.0.17134
 Systemgyp Windows_NT 10.0.17134
 gypERR!  ERR!command  "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\ninof\\me\\code\\me\\client\\node_modules\\grpc\\src\\node\\extension_binary\\node-v67-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\ninof\\me\\code\\me\\client\\node_modules\\grpc\\src\\node\\extension_binary\\node-v67-win32-x64-unknown" "--napi_version=3" "--node_abi_napi=napi" "--python=C:\\Users\\ninof\\AppData\\Local\\Programs\\Python\\Python37\\python.exe"
commandgyp "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\ninof\\me\\code\\me\\client\\node_modules\\grpc\\src\\node\\extension_binary\\node-v67-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\ninof\\me\\code\\me\\client\\node_modules\\grpc\\src\\node\\extension_binary\\node-v67-win32-x64-unknown" "--napi_version=3" "--node_abi_napi=napi" "--python=C:\\Users\\ninof\\AppData\\Local\\Programs\\Python\\Python37\\python.exe"
 ERR!gyp  cwdERR! C:\Users\ninof\me\code\me\client\node_modules\grpc
gyp  cwdERR! C:\Users\ninof\me\code\me\client\node_modules\grpc
 gypnode -v  v11.0.0
gypERR! ERR!  node -v v11.0.0
node-gyp -v v3.8.0
gypgyp  ERR!ERR!  not ok
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\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Users\ninof\me\code\me\client\node_modules\grpc\src\node\extension_binary\node-v67-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\ninof\me\code\me\client\node_modules\grpc\src\node\extension_binary\node-v67-win32-x64-unknown --napi_version=3 --node_abi_napi=napi --python=C:\Users\ninof\AppData\Local\Programs\Python\Python37\python.exe' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\ninof\me\code\me\client\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\\ninof\\me\\code\\me\\client\\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\ninof\me\code\me\client\node_modules\grpc
node-pre-gyp ERR! node -v v11.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
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 configure --fallback-to-build --library=static_library --module=C:\Users\ninof\me\code\me\client\node_modules\grpc\src\node\extension_binary\node-v67-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\ninof\me\code\me\client\node_modules\grpc\src\node\extension_binary\node-v67-win32-x64-unknown --napi_version=3 --node_abi_napi=napi --python=C:\Users\ninof\AppData\Local\Programs\Python\Python37\python.exe' (1)
npm WARN client@1.0.0 No description
npm WARN client@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.16.0 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.16.0 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\ninof\AppData\Roaming\npm-cache\_logs\2018-11-21T15_11_10_182Z-debug.log

The log file doesn’t provide any useful additional info.

404 Error while trying to download stuff, but the error is caught. There is a python syntax error (seriously??), but running npm config set python <path to python 2.7>; npm i firebase throws even more errors.

Does anyone have a possible fix?

I was able to solve this problem by installing grpc globally first and then downgrading node to 9.9.0. I’m on a mac, but hopefully this helps someone!

I have exact same problem

screen shot 2018-07-29 at 5 28 25 pm

Hi! npm install firebase@4.6.1 --save <-- this command helped me to install firebase