firebase / quickstart-nodejs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`npm install` giving errors

cory-baker opened this issue · comments

I run git clone https://github.com/firebase/quickstart-nodejs and then cd quickstart-nodejs/auth-sessions and finally npm install

npm install gives me the following errors:

> grpc@1.9.1 install C:\Users\Cory\desktop\dev\quickstart-nodejs\auth-sessions\node_modules\google-gax\node_modules\grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.9.1/node-v64-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.9.1 and node@10.14.1 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.9.1/node-v64-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.9.1 and node@10.14.1 (node-v64 ABI, unknown) (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:\Users\Cory\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\Cory\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at C:\Users\Cory\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Cory\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\Cory\\desktop\\dev\\quickstart-nodejs\\auth-sessions\\node_modules\\google-gax\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\Cory\\desktop\\dev\\quickstart-nodejs\\auth-sessions\\node_modules\\google-gax\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown"
gyp ERR! cwd C:\Users\Cory\desktop\dev\quickstart-nodejs\auth-sessions\node_modules\google-gax\node_modules\grpc
gyp ERR! node -v v10.14.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not okgyp
 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:\Users\Cory\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\Cory\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
node-pre-gypgyp  ERR!ERR!  build errorstack     at C:\Users\Cory\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29

gyp ERR!node-pre-gyp  stackERR!     at FSReqWrap.oncomplete (fs.js:154:21)
 stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Cory\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Users\Cory\desktop\dev\quickstart-nodejs\auth-sessions\node_modules\google-gax\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Cory\desktop\dev\quickstart-nodejs\auth-sessions\node_modules\google-gax\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown' (1)
gypnode-pre-gyp  ERR!ERR!  Systemstack Windows_NT 10.0.16299
     at ChildProcess.<anonymous> (C:\Users\Cory\Desktop\dev\quickstart-nodejs\auth-sessions\node_modules\google-gax\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
gypnode-pre-gyp  ERR!ERR!  commandstack "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Cory\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\Cory\\desktop\\dev\\quickstart-nodejs\\auth-sessions\\node_modules\\google-gax\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\Cory\\desktop\\dev\\quickstart-nodejs\\auth-sessions\\node_modules\\google-gax\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown"
     at ChildProcess.emit (events.js:182:13)
gypnode-pre-gyp  ERR!ERR!  stackcwd     at maybeClose (internal/child_process.js:962:16)
 C:\Users\Cory\desktop\dev\quickstart-nodejs\auth-sessions\node_modules\google-gax\node_modules\grpc
node-pre-gypgyp  ERR!ERR!  stacknode -v     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
 v10.14.1
node-pre-gypgyp  ERR!ERR!  Systemnode-gyp -v Windows_NT 10.0.16299
 v3.8.0
node-pre-gypgyp  ERR!ERR!  commandnot ok "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Cory\\Desktop\\dev\\quickstart-nodejs\\auth-sessions\\node_modules\\google-gax\\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\Cory\desktop\dev\quickstart-nodejs\auth-sessions\node_modules\google-gax\node_modules\grpc
node-pre-gyp ERR! node -v v10.14.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Cory\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Users\Cory\desktop\dev\quickstart-nodejs\auth-sessions\node_modules\google-gax\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Cory\desktop\dev\quickstart-nodejs\auth-sessions\node_modules\google-gax\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown' (1)
npm WARN firebase-admin-session-mgmt@1.0.0 No repository field.
npm WARN firebase-admin-session-mgmt@1.0.0 license should be a valid SPDX license expression
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.9.1 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.9.1 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\Cory\AppData\Roaming\npm-cache\_logs\2018-12-17T00_02_47_733Z-debug.log
PS C:\Users\Cory\desktop\dev\quickstart-nodejs\auth-sessions> cd ..
PS C:\Users\Cory\desktop\dev\quickstart-nodejs> cd ..
PS C:\Users\Cory\desktop\dev> cd .\quickstart-nodejs\
PS C:\Users\Cory\desktop\dev\quickstart-nodejs> cd  .\database-emulator\
PS C:\Users\Cory\desktop\dev\quickstart-nodejs\database-emulator>

Yes. it can be executed... installing have error and in my case have the following error message when it will be runing:

RROR in ./script.js
Module not found: Error: Can't resolve 'firebase' in '/Users/ricardou/Dropbox/proyectos/investigacion/quickstart-nodejs/auth-sessions'
@ ./script.js 15:15-34

ERROR in ./script.js
Module not found: Error: Can't resolve 'firebaseui' in '/Users/ricardou/Dropbox/proyectos/investigacion/quickstart-nodejs/auth-sessions'
@ ./script.js 16:17-38

I was checking the code and it have correct dependence firebase, firebaseui and firebase-admin in package.json.

The solution is. Run with node V8.10.0 (im using nvm). Its Works!

The solution is: Run with node V8.10.0 (im using n as a node version manager on MACOS). Its Works!

Excellent work, thanks for documenting this fix! Closing this out as there is a known solution :)