Firebase installation error in expo.

PS C:\users\Hi\Documents\React Native\FirebaseSample1> expo install firebase
Installing 1 SDK 40.0.0 compatible native module using npm.

npm install

grpc@1.24.2 install C:\users\Hi\Documents\React Native\FirebaseSample1\node_modules\grpc
node-pre-gyp install –fallback-to-build –library=static_library

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for grpc@1.24.2 and node@14.15.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error socket hang up
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS – not found
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\Hi\Documents\React Native\FirebaseSample1\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node –module_name=grpc_node –module_path=C:\users\Hi\Documents\React Native\FirebaseSample1\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown –napi_version=7 –node_abi_napi=napi –napi_build_version=0 –node_napi_label=node-v83’ (1)
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the “Desktop development with C++” workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS GitHub – nodejs/node-gyp: Node.js native addon build tool
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (child_process.js:315:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
gyp ERR! System Windows_NT 10.0.18363
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\Hi\Documents\React Native\FirebaseSample1\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node” “–module_name=grpc_node” “–module_path=C:\users\Hi\Documents\React Native\FirebaseSample1\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown” “–napi_version=7” “–node_abi_napi=napi” “–napi_build_version=0” “–node_napi_label=node-v83”
gyp ERR! cwd C:\users\Hi\Documents\React Native\FirebaseSample1\node_modules\grpc
gyp ERR! node -v v14.15.0
gyp ERR! node-gyp -v v5.1.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\Hi\Documents\React Native\FirebaseSample1\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node –module_name=grpc_node –module_path=C:\users\Hi\Documents\React Native\FirebaseSample1\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown –napi_version=7 –node_abi_napi=napi –napi_build_version=0 –node_napi_label=node-v83’ (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\HI\Documents\React Native\FirebaseSample1\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\HI\Documents\React Native\FirebaseSample1\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\Hi\Documents\React Native\FirebaseSample1\node_modules\grpc
node-pre-gyp ERR! node -v v14.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.24.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.24.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\HI\AppData\Roaming\npm-cache_logs\2021-01-04T20_05_49_318Z-debug.log

npm exited with non-zero code: 1
Error: npm exited with non-zero code: 1
at ChildProcess.completionListener (C:\Users\HI\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\spawn-async\src\spawnAsync.ts:65:13)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.cp.emit (C:\Users\HI\AppData\Roaming\npm\node_modules\expo-cli\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)

at Object.spawnAsync [as default] (C:\Users\HI\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\spawn-async\src\spawnAsync.ts:26:19)
at NpmPackageManager._runAsync (C:\Users\HI\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\package-manager\src\NodePackageManagers.ts:157:31)
at NpmPackageManager.addAsync (C:\Users\HI\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\package-manager\src\NodePackageManagers.ts💯18) at installAsync (C:\Users\HI\AppData\Roaming\npm\node_modules\expo-cli\src\commands\install.ts:129:3)
at Command. (C:\Users\HI\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:346:7)

expo diasgnostic :slight_smile:

Expo CLI 4.0.17 environment info:
System:
OS: Windows 10 10.0.18363
Binaries:
Node: 14.15.0 – C:\Program Files\nodejs\node.EXE
npm: 6.14.8 – C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 26, 27, 28, 29, 30
Build Tools: 28.0.3, 30.0.2
System Images: android-30 | Google APIs Intel x86 Atom
IDEs:
Android Studio: Version 4.1.0.0 AI-201.8743.12.41.6858069
npmPackages:
expo: ~40.0.0 => 40.0.0
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2
react-native-web: ~0.13.12 => 0.13.18
Expo Workflow: managed

1 possible answer(s) on “Firebase installation error in expo.

  1. I had this issue a few months back, and downgrading to Node 12.x worked as a temporary solution for me, at the time.
    Discovered today that it looks like the expo install firebase command would only install version 7.9.0, for me. After updating my Node to 15.4.0, I was able to install firebase with npm install firebase@latest

    I updated a number of other dependencies today, as well, so it might’ve been something else that fixed it, but I thought I’d share just in case!