React Native and Realm.js - node-pre-gyp 404 error - react-native

I tried to install Realm for React Native. Unfortunately installion failed but I don't know why.
My setup:
Windows 10,
Node.js v4.6.2,
npm v3.10.9,
node-pre-gyp 0.6.31
Error from command line:
D:\Lab\react-native\Hello>npm install realm --save
> realm#0.15.0 install D:\Lab\react-native\Hello\node_modules\realm
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://static.realm.io/node-pre-gyp/realm-v0.15.0-node-v46-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for realm#0.15.0 and node#4.6.2 (node-v46 ABI) (falling back to source compile with node-gyp)
D:\Lab\react-native\Hello\node_modules\realm>if not defined npm_config_node_gyp (node "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node "" clean )
D:\Lab\react-native\Hello\node_modules\realm>if not defined npm_config_node_gyp (node "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=D:\Lab\react-native\Hello\node_modules\realm\compiled\node-v46_win32_x64\realm.node --module_name=realm --module_path=D:\Lab\react-native\Hello\node_modules\realm\compiled\node-v46_win32_x64 ) else (node "" configure --fallback-to-build --module=D:\Lab\react-native\Hello\node_modules\realm\compiled\node-v46_win32_x64\realm.node --module_name=realm --module_path=D:\Lab\react-native\Hello\node_modules\realm\compiled\node-v46_win32_x64 )
Traceback (most recent call last):
File "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module>
sys.exit(gyp.script_main())
File "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main
return main(sys.argv[1:])
File "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main
return gyp_main(args)
File "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 523, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1988, in GenerateOutput
generator_flags))
File "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 927, in _GenerateProject
return _GenerateMSVSProject(project, options, version, generator_flags)
File "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1028, in _GenerateMSVSProject
_AddAccumulatedActionsToMSVS(p, spec, actions_to_add)
File "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 468, in _AddAccumulatedActionsToMSVS
cmd=command)
File "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 438, in _AddCustomBuildToolForMSVS
_ConfigFullName(config_name, c_data), tools=[tool])
File "C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSProject.py", line 181, in AddFileConfig
raise ValueError('AddFileConfig: file "%s" not in project.' % path)
ValueError: AddFileConfig: file "..\..\binding.gyp" not in project.
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\USERNAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "C:\\Users\\USERNAME\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=D:\\Lab\\react-native\\Hello\\node_modules\\realm\\compiled\\node-v46_win32_x64\\realm.node" "--module_name=realm" "--module_path=D:\\Lab\\react-native\\Hello\\node_modules\\realm\\compiled\\node-v46_win32_x64"
gyp ERR! cwd D:\Lab\react-native\Hello\node_modules\realm
gyp ERR! node -v v4.6.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=D:\Lab\react-native\Hello\node_modules\realm\compiled\node-v46_win32_x64\realm.node --module_name=realm --module_path=D:\Lab\react-native\Hello\node_modules\realm\compiled\node-v46_win32_x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (D:\Lab\react-native\Hello\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:854:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\Lab\\react-native\\Hello\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\Lab\react-native\Hello\node_modules\realm
node-pre-gyp ERR! node -v v4.6.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.31
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=D:\Lab\react-native\Hello\node_modules\realm\compiled\node-v46_win32_x64\realm.node --module_name=realm --module_path=D:\Lab\react-native\Hello\node_modules\realm\compiled\node-v46_win32_x64' (1)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "D:\\Program Files\\nodejs\\node.exe" "C:\\Users\\USERNAME\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "realm" "--save"
npm ERR! node v4.6.2
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! realm#0.15.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the realm#0.15.0 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the realm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs realm
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls realm
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\Lab\react-native\Hello\npm-debug.log
I tried to install node-pre-gyp and node-gyp. I also checked Python version - everything should be ok but something goes wrong.

This is a known problem on Windows, being tracked here. It should be fixed soon.

Related

How to install argon2 without downloading prebuild binaries each time with npm install?

I have the problem, that npm install always fails in my project in my continuous integration system (windows OS) because of the npm library argon2 (https://www.npmjs.com/package/argon2).
Here is the log:
...
> keytar#7.9.0 install <Path>\node_modules\keytar
> prebuild-install || npm run build
prebuild-install warn install connect ECONNREFUSED <IP:PORT>
> keytar#7.9.0 build <Path>\node_modules\keytar
> node-gyp rebuild
<Path>\node_modules\keytar>if not defined npm_config_node_gyp (node "C:\ProgramData\nvm\v14.15.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\ProgramData\nvm\v14.15.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ECONNREFUSED <IP:PORT>
gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\ProgramData\\nvm\\v14.15.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd <Path>\node_modules\keytar
gyp ERR! node -v v14.15.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keytar#7.9.0 build: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the keytar#7.9.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! <Path>\npm-cache\_logs\2022-07-14T13_17_19_027Z-debug.log
> argon2#0.27.2 install <Path>\node_modules\argon2
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! install request to https://github.com/ranisalt/node-argon2/releases/download/v0.27.2/argon2-v0.27.2-napi-v3-win32-x64-unknown.tar.gz failed, reason: connect ECONNREFUSED 140.82.121.4:443
node-pre-gyp WARN Pre-built binaries not installable for argon2#0.27.2 and node#14.15.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error request to https://github.com/ranisalt/node-argon2/releases/download/v0.27.2/argon2-v0.27.2-napi-v3-win32-x64-unknown.tar.gz failed, reason: connect ECONNREFUSED 140.82.121.4:443
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ECONNREFUSED <IP:PORT>
gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\ProgramData\\nvm\\v14.15.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=<Path>\\node_modules\\argon2\\lib\\binding\\napi-v3\\argon2.node" "--module_name=argon2" "--module_path=<Path>\\node_modules\\argon2\\lib\\binding\\napi-v3" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd <Path>\node_modules\argon2
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:\ProgramData\nvm\v14.15.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=<Path>\node_modules\argon2\lib\binding\napi-v3\argon2.node --module_name=argon2 --module_path=<Path>\node_modules\argon2\lib\binding\napi-v3 --napi_version=7 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (<Path>\node_modules\#mapbox\node-pre-gyp\lib\util\compile.js:89:23)
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 6.3.9600
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "<Path>\\node_modules\\#mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd <Path>\node_modules\argon2
node-pre-gyp ERR! node -v v14.15.0
node-pre-gyp ERR! node-pre-gyp -v v1.0.9
node-pre-gyp ERR! not ok
...
I think it is related to the proxy problem, such that the request to GitHub for getting the prebuild binaries does not work.
How can I avoid downloading the prebuild binaries in my continuous integration system? Can I download them locally, commit them to my project somewhere?
The project in the continuous integration system is already connected to an internal npm registry.

Error while installing packages from expo installing

I am working on react-native project and while installing firebase using expo install firebase and I am getting error continuosly:
Installing 1 SDK 40.0.0 compatible native module using npm.
> npm install
npm ERR! code 1
npm ERR! path E:\React-native\new1\node_modules\grpc
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=E:\React-native\new1\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=E:\React-native\new1\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 --python=C:\Users\HP\.windows-build-tools\python27\python.exe' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#0.14.0
npm ERR! node-pre-gyp info using node#14.16.0 | win32 | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "E:\React-native\new1\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node" (not found)
npm ERR! node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc/v1.24.2/node-v83-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp http 404 https://node-precompiled-binaries.grpc.io/grpc/v1.24.2/node-v83-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.24.2/node-v83-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for grpc#1.24.2 and node#14.16.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://node-precompiled-binaries.grpc.io/grpc/v1.24.2/node-v83-win32-x64-unknown.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#14.16.0 | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#14.16.0 | win32 | x64
npm ERR! gyp info find Python using Python version 2.7.15 found at "C:\Users\HP\.windows-build-tools\python27\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2019 (16.1.29102.190) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional"
npm ERR! gyp ERR! find VS - "Visual Studio C++ core features" missing
npm ERR! gyp ERR! find VS checking VS2017 (15.9.28307.586) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - missing any VC++ toolset
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack at C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (child_process.js:315:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:315:20)
npm ERR! gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19041
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\HP\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=E:\\React-native\\new1\\node_modules\\grpc\\src\\node\\extension_binary\\node-v83-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=E:\\React-native\\new1\\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" "--python=C:\\Users\\HP\\.windows-build-tools\\python27\\python.exe"
npm ERR! gyp ERR! cwd E:\React-native\new1\node_modules\grpc
npm ERR! gyp ERR! node -v v14.16.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=E:\React-native\new1\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=E:\React-native\new1\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 --python=C:\Users\HP\.windows-build-tools\python27\python.exe' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (E:\React-native\new1\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
npm ERR! node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19041
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\React-native\\new1\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
npm ERR! node-pre-gyp ERR! cwd E:\React-native\new1\node_modules\grpc
npm ERR! node-pre-gyp ERR! node -v v14.16.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Local\npm-cache\_logs\2021-02-27T11_25_59_406Z-debug.log
npm exited with non-zero code: 1
Error: npm exited with non-zero code: 1
at ChildProcess.completionListener (C:\Users\HP\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\HP\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 Socket.<anonymous> (internal/child_process.js:439:11)
at Socket.emit (events.js:315:20)
at Pipe.<anonymous> (net.js:673:12)
...
at Object.spawnAsync [as default] (C:\Users\HP\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\spawn-async\src\spawnAsync.ts:26:19)
at NpmPackageManager._runAsync (C:\Users\HP\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\package-manager\src\NodePackageManagers.ts:162:31)
at NpmPackageManager.addAsync (C:\Users\HP\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\package-manager\src\NodePackageManagers.ts:105:18)
at installAsync (C:\Users\HP\AppData\Roaming\npm\node_modules\expo-cli\src\commands\install.ts:130:3)
at Command.<anonymous> (C:\Users\HP\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:347:7)
I tried npm i -g windows-build-tools and npm install -g node-gyp as well
but I can't get problems in it..
Can anyone please help me out?
Node version- v14.16.0
Npm version- 7.6.0
expo version- 4.2.1
You first need to clear the npm cache by using this command
npm cache clean --force
if it doesn't work then manually delete the %appdata%\npm-cache folder.
then update your npm
npm install npm#latest -g
then you can try installing expo firebase by this
expo install firebase
Thanks :)
before installing node-gyp on windows
npm install --global --production windows-build-tools
install node-gyp globally
npm install -g node-gyp
I uninstalled the node from the system and then downloaded and installed version 14.15.1 and this issue was resolved

inso cli installation failure

I have wsl2(ubunto) and using windows terminal I try to install insomnonia inso using the command "npm i -g insomnia-inso"
how ever I get error
Could not run curl-config, please make sure libcurl dev package is installed.
Output: /bin/sh: 1: curl-config: not found
gyp: Call to 'node /usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/tools/curl-config.js --prefix' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.128-microsoft-standard
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/lib/binding/node_libcurl.node" "--module_name=node_libcurl" "--module_path=/usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/lib/binding" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v79"
gyp ERR! cwd /usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl
gyp ERR! node -v v13.14.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 '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/lib/binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/lib/node_modules/insomnia-inso/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:1026:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Linux 4.19.128-microsoft-standard
node-pre-gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/insomnia-inso/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl
node-pre-gyp ERR! node -v v13.14.0
node-pre-gyp ERR! node-pre-gyp -v v0.15.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/usr/lib/node_modules/insomnia-inso/node_modules/node-libcurl/lib/binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (node_modules/insomnia-inso/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-libcurl#2.2.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-libcurl#2.2.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! /home/limbido/.npm/_logs/2020-12-16T08_08_44_621Z-debug.log
I still have the same error after trying
"sudo npm i -g insomnia-inso --unsafe-perm"
this command works for me
sudo npm i -g insomnia-inso -unsafe-perm --allow-root

Realm React-native error

I'm having this error when I try to install Realm with my react-native android app:
npm install --save realm
> -realm#0.15.0 install C:\Users\Julia\AppTest\node_modules\realm
> -node-pre-gyp install --fallback-to-build
>node-pre-gyp ERR! Tried to download(404): https://static.realm.io/node-pre-gyp/realm-v0.15.0-node-v48-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for realm#0.15.0 and node#6.9.1 (node-v48 ABI) (falling back to source compile with node-gyp)
C:\Users\Julia\AppTest\node_modules\realm>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node "" clean )
C:\Users\Julia\AppTest\node_modules\realm>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=C:\Users\Julia\AppTest\node_modules\realm\compiled\node-v48_win32_x64\realm.node --module_name=realm --module_path=C:\Users\Julia\AppTest\node_modules\realm\compiled\node-v48_win32_x64 ) else (node "" configure --fallback-to-build --module=C:\Users\Julia\AppTest\node_modules\realm\compiled\node-v48_win32_x64\realm.node --module_name=realm --module_path=C:\Users\Julia\AppTest\node_modules\realm\compiled\node-v48_win32_x64 )
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 failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:404:11
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 10.0.14393
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" "--module=C:\\Users\\Julia\\AppTest\\node_modules\\realm\\compiled\\node-v48_win32_x64\\realm.node" "--module_name=realm" "--module_path=C:\\Users\\Julia\\AppTest\\node_modules\\realm\\compiled\\node-v48_win32_x64"
gyp ERR! cwd C:\Users\Julia\AppTest\node_modules\realm
gyp ERR! node -v v6.9.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\Julia\AppTest\node_modules\realm\compiled\node-v48_win32_x64\realm.node --module_name=realm --module_path=C:\Users\Julia\AppTest\node_modules\realm\compiled\node-v48_win32_x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\Julia\AppTest\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Julia\\AppTest\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Julia\AppTest\node_modules\realm
node-pre-gyp ERR! node -v v6.9.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\Julia\AppTest\node_modules\realm\compiled\node-v48_win32_x64\realm.node --module_name=realm --module_path=C:\Users\Julia\AppTest\node_modules\realm\compiled\node-v48_win32_x64' (1)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "realm"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! realm#0.15.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the realm#0.15.0 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the realm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs realm
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls realm
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Julia\AppTest\npm-debug.log
What do I do? I'm following the steps on the page 'https://realm.io/docs/react-native/latest/#getting-started', however when I install Realm on the command Promt I get this error.
We currently have an issue with React Native when developing on a Windows machine. We are working on fixing it, you can keep track of the issue here

Error installing vcremote on Mac OS X 10.11

I am trying to install vcremote with 'sudo npm install -g --unsafe-perm vcremote' but getting below error:
/usr/local/bin/vcremote -> /usr/local/lib/node_modules/vcremote/bin/vcremote
> thread-sleep#1.0.4 install /usr/local/lib/node_modules/vcremote/node_modules/thread-sleep
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack Error: Cannot find module 'internal/fs'
node-pre-gyp ERR! stack at Function.Module._resolveFilename (module.js:472:15)
node-pre-gyp ERR! stack at Function.Module._load (module.js:420:25)
node-pre-gyp ERR! stack at Module.require (module.js:500:17)
node-pre-gyp ERR! stack at require (internal/module.js:20:19)
node-pre-gyp ERR! stack at evalmachine.<anonymous>:17:20
node-pre-gyp ERR! stack at Object.<anonymous> (/usr/local/lib/node_modules/vcremote/node_modules/thread-sleep/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/fs.js:11:1)
node-pre-gyp ERR! stack at Module._compile (module.js:573:32)
node-pre-gyp ERR! stack at Object.Module._extensions..js (module.js:582:10)
node-pre-gyp ERR! stack at Module.load (module.js:490:32)
node-pre-gyp ERR! stack at tryModuleLoad (module.js:449:12)
node-pre-gyp ERR! System Darwin 15.6.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/vcremote/node_modules/thread-sleep/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/vcremote/node_modules/thread-sleep
node-pre-gyp ERR! node -v v7.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.9
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
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>
> node-ios-device#0.5.2 install /usr/local/lib/node_modules/vcremote/node_modules/node-ios-device
> node-gyp rebuild
CXX(target) Release/obj.target/node_module_version/src/node-module-version.o
LINK(target) Release/node_module_version
CXX(target) Release/obj.target/node_ios_device/src/ios-device.o
In file included from ../src/ios-device.cpp:8:
In file included from ../../nan/nan.h:182:
../../nan/nan_maybe_43_inl.h:221:17: warning: 'CloneElementAt' is deprecated [-Wdeprecated-declarations]
return array->CloneElementAt(GetCurrentContext(), index);
^
/Users/Sibridge/.node-gyp/7.1.0/include/node/v8.h:3056:36: note: 'CloneElementAt' has been explicitly marked deprecated here
MaybeLocal<Object> CloneElementAt(Local<Context> context,
^
In file included from ../src/ios-device.cpp:8:
In file included from ../../nan/nan.h:188:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:40:29: warning: 'New' is deprecated [-Wdeprecated-declarations]
return v8::BooleanObject::New(value).As<v8::BooleanObject>();
^
/Users/Sibridge/.node-gyp/7.1.0/include/node/v8.h:4048:56: note: 'New' has been explicitly marked deprecated here
V8_DEPRECATED("Pass an isolate", static Local<Value> New(bool value));
^
In file included from ../src/ios-device.cpp:8:
../../nan/nan.h:590:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback
~~~~~~~~~~~~~^
../../nan/nan.h:596:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback) {
~~~~~~~~~~~~~^
../../nan/nan.h:601:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
v8::Isolate::GCPrologueCallback callback
~~~~~~~~~~~~~^
../../nan/nan.h:607:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
v8::Isolate::GCPrologueCallback callback) {
~~~~~~~~~~~~~^
../../nan/nan.h:1927:15: warning: 'SetAccessor' is deprecated [-Wdeprecated-declarations]
return obj->SetAccessor(
^
/Users/Sibridge/.node-gyp/7.1.0/include/node/v8.h:2761:22: note: 'SetAccessor' has been explicitly marked deprecated here
bool SetAccessor(Local<Name> name,
^
3 warnings and 4 errors generated.
make: *** [Release/obj.target/node_ios_device/src/ios-device.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/vcremote/node_modules/node-ios-device
gyp ERR! node -v v7.1.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
/usr/local/lib
└── (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: thread-sleep#1.0.4 (node_modules/vcremote/node_modules/thread-sleep):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: thread-sleep#1.0.4 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 7
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "--unsafe-perm=true" "vcremote"
npm ERR! node v7.1.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! node-ios-device#0.5.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-ios-device#0.5.2 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-ios-device package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-ios-device
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-ios-device
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Sibridge/npm-debug.log
npm ERR! code 1
I have already tried uninstalling and reinstalling node-gyp, but it didn't work.
How to fix it?
It looks like a bug has been filed with Microsoft (see https://connect.microsoft.com/VisualStudio/Feedback/Details/3110480). It appears that this is an issue with an outdated dependency that doesn't work with newer (>6.5) versions of node.
There are detailed steps to how to manually update the dependency at
https://social.msdn.microsoft.com/Forums/vstudio/en-US/77545f82-6f66-47d6-b00c-02d73089cb00/installing-vcremote?forum=vcgeneral.
You need to update the ioslib dependency to 1.0.3 and the node-ios-device to 1.1.0. That worked for me. Downgrading to node 6.5 might work as well.