Open unoegohh opened 6 years ago
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?
hi! i am trying to install firebase from C:\Projects\reactnative\auth
via npm install firebase --save
and i have no idea why node-pre-gyp running scripts from root directory, in case of install failes i have no grpc directory in node_modules
in case of install failes i have no grpc directory in
node_modules
Right, sorry!
How about trying to install grpc@1.11.3 by itself?
i.e.
npm install grpc@1.11.3 --save
@mark-buer I have the same problem and npm install grpc@1.11.3 --save
didn't solve my problem.
I am still searching.
I have exact same problem
do you guys get any solution ?
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!
Is there any simple way to downgrade node from 10.12 to 9.9.0? @akwright ?
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?
That last report has nothing to do with the initial issue. In your last case, you are trying to install an older version of grpc under windows and an unsupported version of nodejs at the time.
Also, this has nothing to do with node-pre-gyp, but is specific to grpc.
@nicolasnoble npm i firebase
throws an error while internally executing node-pre-gyp install --fallback-to-build --library=static_library
, I don't see how I can be more related to node-pre-gyp and the initial issue
Well, I'm an author of the grpc package, and your report clearly states that node-pre-gyp is trying to install grpc. I am positive about what's going on here.
Okay thanks for the tip! So do you have any idea about what could be done make things work?
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.
Thanks! will try
I was able to fix it by simple turn off Kaspersky Antivirus :))
Maybe it's help some1 else.
Worked for me npm install firebase --force .
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.
I just experienced this issue on my brand spanking new MacBook Pro. Firebase wouldn't install in my project and displayed a bunch of nasty errors.
As noted by @nicolasnoble, Node 11 was the culprit. I originally installed Node from the command line with Brew, which defaults to the current release of 11.3.0. After downgrading to the 10.14.1 via the installer, I was able to install Firebase without a problem.
Note that we've published grpc 1.16.1 with the latest fixes from node-pre-gyp and node 11 support.
@ninofiliu I am having a similar issue as you. The first step I took was to revise python alias from python 3 to python 2.7. (changed when installing anaconda). Any idea of how you solved it afterwards ? Thanks for your help
@AliceGab I followed @nicolasnoble 's advices, it didn't work, then I continued the development on a Linux machine ^^
@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:
node_modules
and package-lock.json
if they exist. You want to start fresh.npm install
.npm install firebase --force
.node-pre-gyp
errors and warnings, but at the end you should see
+ firebase@x.x.x
added x packages in xs
Possible reasons for issues may include being behind a company proxy and/or firewall.
Seems related to this one: https://github.com/grpc/grpc-node/issues/121
I was able to find my answer over there. I hope this helps
I went through the same thing, tried everything, but in the end I installed firebase using yarn
I encountered a similar issue with python3 on windows. And switch to python2 solve the problem
I tried using sudo npm i -g firebase --force
and it worked. It seems that .node-gyp folder had different file permissions. I had to change to Other users should read and write and it worked well without force.
I am using Ubuntu 16.04. Hope it helps someone.
`john@john-Latitude-E5510:~$ sudo npm i -g firebase
I just downgraded npm from 12.0.0 to the LTS version (10.15.3 as of today), and it worked! 😁
I was gone through same problem solved after lot efforts. It is because of npm version is not compatible with gprc version. So we need to update the npm.
1 - npm update 2 - npm install
this solve my issue. Thank you
Hi! npm install firebase@4.6.1 --save <-- this command helped me to install firebase
Worked for me npm install firebase --force .
Finally this worked for me
@EgorKazachenko 's solution is the one that works for me.
I'm on Windows 10. Node
v8.11.3
NPMv5.6.0
Steps to install everything successfully:
- Remove
node_modules
andpackage-lock.json
if they exist. You want to start fresh.- Run
npm install
.- After install of everything else without an error, run
npm install firebase --force
.- 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
- Success!
Possible reasons for issues may include being behind a company proxy and/or firewall.
Man this worked for me... Wooohooo 🥇
@EgorKazachenko 's solution is the one that works for me.
I'm on Windows 10. Node
v8.11.3
NPMv5.6.0
Steps to install everything successfully:
- Remove
node_modules
andpackage-lock.json
if they exist. You want to start fresh.- Run
npm install
.- After install of everything else without an error, run
npm install firebase --force
.- 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
- Success!
Possible reasons for issues may include being behind a company proxy and/or firewall.
Worked for me ! Thanks~~~
try with "--force" for me it works
I just run npm install firebase
and it works. It was just a outdated version issue for me (i'm still learning).
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. (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.logmaybe i dont get something?
try this command ( as an Administrator) on Terminal npm install -g windows-build-tools
its worked for me
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 (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
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.maybe i dont get something?