firebase-tools: Unable to complete "npm install -g firebase-tools" command in windows 10 environment
Version info
OS - windows 10 node.js version - 8.9.4 npm version - 5.6.0
Steps to reproduce
- open command prompt in selected folder
- Run “npm install -g firebase-tools” command.
Expected behavior
Should be installed packages related to firebase.
Actual behavior
Getting errors while running above mentioned command…
LOG
C:\Users\Chetan\Desktop\aaa>npm install -g firebase-tools npm WARN deprecated node-uuid@1.4.8: Use uuid module instead C:\Users\Chetan\AppData\Roaming\npm\firebase -> C:\Users\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\bin\firebase
grpc@1.4.1 install C:\Users\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.4.1/node-v57-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.4.1 and node@8.9.4 (node-v57 ABI) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can’t find Python executable “python”, you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.16299
gyp 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\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc\src\node\extension_binary\grpc_node.node” “–module_name=grpc_node” “–module_path=C:\Users\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc\src\node\extension_binary”
gyp ERR! cwd C:\Users\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Users\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc\src\node\extension_binary\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc\src\node\extension_binary’ (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\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\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc
node-pre-gyp ERR! node -v v8.9.4
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
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\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc\src\node\extension_binary\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc\src\node\extension_binary’ (1)
npm WARN rollback Rolling back concat-map@0.0.1 failed (this is probably harmless): EPERM: operation not permitted, scandir ‘C:\Users\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc\node_modules\node-pre-gyp\node_modules\rimraf\node_modules\glob\node_modules\minimatch\node_modules\brace-expansion\node_modules’
npm WARN rollback Rolling back concat-map@0.0.1 failed (this is probably harmless): EPERM: operation not permitted, scandir ‘C:\Users\Chetan\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc\node_modules\node-pre-gyp\node_modules\tar-pack\node_modules\fstream-ignore\node_modules\minimatch\node_modules\brace-expansion\node_modules’
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: grpc@1.4.1 (node_modules\firebase-tools\node_modules\grpc):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: grpc@1.4.1 install: node-pre-gyp install --fallback-to-build --library=static_library
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
- firebase-tools@3.17.3 added 7 packages and updated 2 packages in 111.968s
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 26 (3 by maintainers)
Cleane installation Chace with:
npm cache clean --force
and install again firebase tools
npm install -g firebase-tools
Uninstall this one and install previous version (v3.17.2) See my answer on Stackoverflow
UPDATE
Today published version (v3.17.4) has the same problem, still getting errors on install therefore I’m still stuck with v3.17.2.
Guys, i dont belive… work for me. take a look:
Kaspersky Anti-virus has an active invasive check into HTTPS connections that causes this kind of problem with npm. Tested with antivirus on and off and I can confirm that it is causing the problem.
After completely disabling Encrypted connections scanning all worked as intended.
https://github.com/grpc/grpc-node/issues/140
Thank you so much! That fixed the error.
I solved this issue. i think firebase-tools module depend on specific npm version
│ New major version of npm available! 6.14.8 → 7.20.1 │ │ Changelog: https://github.com/npm/cli/releases/tag/v7.20.1 │ │ Run npm install -g npm to update! │
here is my case: $ npm --version 6.14.6
$ node --version v12.18.3
using this command 😒 npm install -g firebase-tools =>FAILED. using this command 😒 npm i -g firebase-tools => SUCCESS.
not sure what different between ‘install’ and ‘i’.
Until the version is bumped, I could get gRPC to compile by temporarily removing
%USERPROFILE%\.node-gyp\<version>\include\node\openssl
. OtherwiseMSBuild.exe
fails.The problem here is that there are no pre-built binaries available for Node 9 and gRPC 1.4.1 and building gRPC fails on Windows. I’ve invested a lot of time trying to get gRPC to build, but still no luck.
There are gRPC binaries available for the latest version though, 1.9.1.
@mbleigh Can the version of the gRPC dependency be bumped to 1.9.1? That would solve this issue for all of us Windows users, because we wouldn’t have to build anymore.
EDIT: Well actually not “this” issue, because the op simply doesn’t have Python configured correctly, so he doesn’t even get to the point where the build fails.
UPDATE 2
windows-build-tools
package got an update yesterday so I installed it with hope it solves the problems installing latest version offirebase-tools
. It did not, same errors occur.That solved me the problem: exp 11.0.0 version for
Please update to a version of grpc that has precompiled binaries for windows, compiling anything on windows is a pain, the only sane solution is to have it precompiled.
@exawatt I did, Python is working on my machine, it had nothing to do with build error for native packages it tries to build & fails.