I got this error when I was trying to install brain.js with npm, I wrote npm i -S brain.js - npm

I tried to install brain.js but it shows this monster looking error which I couldn't fid any solution by searching many times. I typed in my shell "npm i -S brain.js" but it shows this error.
If anyone seeing this can help me, I will be very happy
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions
may use Math.random() in certain circumstances, which is known to be problematic. See
https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see
https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path C:\Users\Tanbir\node_modules\gl
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || node-gyp rebuild
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#16.13.1 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.1 found at "C:\Users\Tanbir\AppData\Local\Programs\Python\Python310\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 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\Tanbir\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Users\Tanbir\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\Tanbir\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Users\Tanbir\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Users\Tanbir\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack at C:\Users\Tanbir\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\Tanbir\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Tanbir\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\Tanbir\node_modules\gl
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Tanbir\AppData\Local\npm-cache\_logs\2022-04-08T18_38_19_827Z-debug-0.log

The simplest way to solve it is by typing:
npm install --save brain.js#1.4.10
This will install the lastest version from the releases page that works. This worked for me on Windows.

I am figuring out how to solve the same issue.
Try to install Visual Studio first. The errormessage says it quite clearly: 'You need to install the latest version of Visual Studio including the "Desktop development with C++" workload.'.
Once installed visual studio, in my case, the brain.js missed the gl library. Solution:
npm install --save -g gl
Finally I installed the brain.js via:
npm install --save -g brain.js
(the help from brain.js site doesn't use the -g "istall globally option")
Please consider I'm trying the solutions while I'm writing here, maybe I'm back later on with a better solution.
My view: the various element versions (npm, node.js, brain.js, the bound libraries etc. ) has been recently updated and somewhat something doesn't work perfectly.

Related

cant run sample paracel git hub oidc-client-ts

PS C:\Users\asus\Desktop\masood\oidc-client-ts\samples\Parcel> npm i
npm ERR! code 1
npm ERR! path C:\Users\asus\Desktop\masood\oidc-client-ts\samples\Parcel\node_modules#parcel\watcher
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c C:\Users\asus\AppData\Local\Temp\install-3ae09d85.cmd
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.0.0
npm ERR! gyp info using node#16.17.0 | win32 | ia32
npm ERR! gyp info find Python using Python version 3.10.6 found at "C:\Users\asus\AppData\Local\Programs\Python\Python310\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 VS2017 (15.9.28307.2094) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
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\asus\AppData\Roaming\nvm\v16.17.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Users\asus\AppData\Roaming\nvm\v16.17.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\asus\AppData\Roaming\nvm\v16.17.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at C:\Users\asus\AppData\Roaming\nvm\v16.17.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Users\asus\AppData\Roaming\nvm\v16.17.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Users\asus\AppData\Roaming\nvm\v16.17.0\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\asus\AppData\Roaming\nvm\v16.17.0\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:408:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1093:16)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\asus\AppData\Roaming\nvm\v16.17.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\asus\Desktop\masood\oidc-client-ts\samples\Parcel\node_modules#parcel\watcher
npm ERR! gyp ERR! node -v v16.17.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\asus\AppData\Local\npm-cache_logs\2022-09-11T18_59_18_136Z-debug-0.log
PS C:\Users\asus\Desktop\masood\oidc-client-ts\samples\Parcel>

Truffle installation error - cannot find visual studio installation

I have been trying to install truffle for some time, but I keep getting the following gyp error:
npm ERR! code 1
npm ERR! path C:\Users\Miri\AppData\Roaming\npm\node_modules\truffle\node_modules\ganache\node_modules\keccak
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
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.18.1 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.4 found at "C:\Users\Miri\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version was set from command line or npm config
npm ERR! gyp ERR! find VS - looking for Visual Studio version 2022
npm ERR! gyp ERR! find VS running in VS Command Prompt, installation path is:
npm ERR! gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022"
npm ERR! gyp ERR! find VS - will only use this version
npm ERR! gyp ERR! find VS unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\2022\Community"
npm ERR! gyp ERR! find VS checking VS2017 (15.9.28307.1974) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v141
npm ERR! gyp ERR! find VS - found Windows SDK: 10.0.17763.0
npm ERR! gyp ERR! find VS - msvs_version does not match this version
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 msvs_version does not match this VS Command Prompt or the
npm ERR! gyp ERR! find VS installation cannot be used.
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\Miri\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Users\Miri\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\Miri\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Users\Miri\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Users\Miri\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack at C:\Users\Miri\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\Miri\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:390:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:400:28)
npm ERR! gyp ERR! stack at maybeClose (internal/child_process.js:1058:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19041
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Miri\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\Miri\AppData\Roaming\npm\node_modules\truffle\node_modules\ganache\node_modules\keccak
npm ERR! gyp ERR! node -v v14.18.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Miri\AppData\Local\npm-cache\_logs\2022-05-27T12_19_08_825Z-debug.log
I have already looked at Getting Error on installing Truffle on windows 10 using npm install truffle -g but the error there is diferent. See unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\2022\Community this line(15).
I already have Visual Studio 2022 Community installed.
Does anyone know what this error is and how to resolve it?
Any help would be appreciated. Thanks!!

NPM keeps failing when trying to install ZeroRPC

Everytime I run npm install zerorpc I get this:
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm ERR! code 1
npm ERR! path C:\Users\Admin\node_modules\zeromq
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)
npm ERR! Downloading libzmq for Windows
npm ERR! Download finished
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.0.0
npm ERR! gyp info using node#16.14.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.2 found at "C:\Python310\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 running in VS Command Prompt, installation path is:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2022"
npm ERR! gyp ERR! find VS - will only use this version
npm ERR! gyp ERR! find VS checking VS2019 (16.11.32228.343) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v142
npm ERR! gyp ERR! find VS - found Windows SDK: 10.0.19041.0
npm ERR! gyp ERR! find VS - does not match this Visual Studio Command Prompt
npm ERR! gyp ERR! find VS checking VS2019 (16.11.32228.343) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v142
npm ERR! gyp ERR! find VS - found Windows SDK: 10.0.19041.0
npm ERR! gyp ERR! find VS - does not match this Visual Studio Command Prompt
npm ERR! gyp ERR! find VS checking VS2017 (15.9.28307.1831) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v141
npm ERR! gyp ERR! find VS - found Windows SDK: 10.0.17763.0
npm ERR! gyp ERR! find VS - does not match this Visual Studio Command Prompt
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:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\run-script\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\run-script\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\run-script\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\run-script\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\run-script\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\run-script\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\run-script\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:406:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\#npmcli\\run-script\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\Admin\node_modules\zeromq
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Admin\AppData\Local\npm-cache\_logs\2022-03-10T12_12_25_422Z-debug-0.log
Here's the full log on pastebin if you need it: https://pastebin.com/XBQwUPDX
I've got Visual Studio 2015, 2017, 2019
I've got the build tools
Desktop development with C++ installed
Updated node-gyp
Haven't been able to install Zeromq, gives the same error

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

npm install for Hyperledger Tutorial Fails

I am currently working on a fresh minimal install of Ubuntu 16.0.4 using Hyperledger Fabric. I have pulled down a fresh install of the fabric samples from the Hyperledger documentation site. I have downloaded the following software:
node version 6.9.5
npm version 3.10.10
docker version 17.03.2-ce
golang version 1.7.6 (documentation now calls for newer version, but I think this is unrelated)
I can navigate to the fabcar directory which contains the default npm package.json. I first run ./startFabric as indicated in the instructions. I then run npm install, per the instructions. I then get the error:
u#ubmin2:~/fabric-samples/fabcar$ npm install
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
> pkcs11js#1.0.9 install /home/u/fabric-samples/fabcar/node_modules/pkcs11js
> npm run build
> pkcs11js#1.0.9 build /home/u/fabric-samples/fabcar/node_modules/pkcs11js
> node-gyp configure build
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/local/node/lib/node_modules/npm/node_modules/which/which.js:14:12)
gyp ERR! stack at F (/usr/local/node/lib/node_modules/npm/node_modules/which/which.js:69:19)
gyp ERR! stack at E (/usr/local/node/lib/node_modules/npm/node_modules/which/which.js:81:29)
gyp ERR! stack at /usr/local/node/lib/node_modules/npm/node_modules/which/which.js:90:16
gyp ERR! stack at /usr/local/node/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack at /usr/local/node/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Linux 4.4.0-96-generic
gyp ERR! command "/usr/local/node/bin/node" "/usr/local/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/u/fabric-samples/fabcar/node_modules/pkcs11js
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 4.4.0-96-generic
npm ERR! argv "/usr/local/node/bin/node" "/usr/local/node/bin/npm" "run" "build"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! pkcs11js#1.0.9 build: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.9 build script 'node-gyp configure 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 pkcs11js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pkcs11js
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pkcs11js
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
...
Based on that, it appears that there is a missing pkcs11js module that needs to be included. When I add that module to the package.json file, remove the node_modules file and rerun the "npm install," the error shifts to:
u#ubmin2:~/fabric-samples/fabcar$ npm install
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
> pkcs11js#1.0.9 install /home/u/fabric-samples/fabcar/node_modules/pkcs11js
> npm run build
> pkcs11js#1.0.9 build /home/u/fabric-samples/fabcar/node_modules/pkcs11js
> node-gyp configure build
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/local/node/lib/node_modules/npm/node_modules/which/which.js:14:12)
gyp ERR! stack at F (/usr/local/node/lib/node_modules/npm/node_modules/which/which.js:69:19)
gyp ERR! stack at E (/usr/local/node/lib/node_modules/npm/node_modules/which/which.js:81:29)
gyp ERR! stack at /usr/local/node/lib/node_modules/npm/node_modules/which/which.js:90:16
gyp ERR! stack at /usr/local/node/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack at /usr/local/node/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Linux 4.4.0-96-generic
gyp ERR! command "/usr/local/node/bin/node" "/usr/local/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/u/fabric-samples/fabcar/node_modules/pkcs11js
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 4.4.0-96-generic
npm ERR! argv "/usr/local/node/bin/node" "/usr/local/node/bin/npm" "run" "build"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! pkcs11js#1.0.9 build: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.9 build script 'node-gyp configure 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 pkcs11js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pkcs11js
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pkcs11js
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! Please include the following file with any support request:
npm ERR! /home/u/fabric-samples/fabcar/node_modules/pkcs11js/npm-debug.log
fabcar#1.0.0 /home/u/fabric-samples/fabcar
...
Does anyone understand why npm install is failing to run as expected?
------UPDATE------
in response to christo4ferris, sorry, I should have shown that as well. I've tried many things including installing and removing make. when I install make, I still get an error:
npm WARN fabcar#1.0.0 No repository field.
npm ERR! Linux 4.4.0-96-generic
npm ERR! argv "/usr/local/node/bin/node" "/usr/local/node/bin/npm" "install"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! path /home/u/fabric-samples/fabcar/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/home/u/fabric-samples/fabcar/node_modules'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, access '/home/u/fabric-samples/fabcar/node_modules'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/home/u/fabric-samples/fabcar/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/u/fabric-samples/fabcar/npm-debug.log
And then, when I run as sudo us to run as root, I get this error message:
root#ubmin2:/home/u/fabric-samples/fabcar# npm install
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
> pkcs11js#1.0.9 install /home/u/fabric-samples/fabcar/node_modules/pkcs11js
> npm run build
> pkcs11js#1.0.9 build /home/u/fabric-samples/fabcar/node_modules/pkcs11js
> node-gyp configure build
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/6.9.5"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/u/fabric-samples/fabcar/node_modules/pkcs11js/.node-gyp"
make: Entering directory '/home/u/fabric-samples/fabcar/node_modules/pkcs11js/build'
CXX(target) Release/obj.target/pkcs11/src/main.o
make: g++: Command not found
pkcs11.target.mk:107: recipe for target 'Release/obj.target/pkcs11/src/main.o' failed
make: *** [Release/obj.target/pkcs11/src/main.o] Error 127
make: Leaving directory '/home/u/fabric-samples/fabcar/node_modules/pkcs11js/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/node/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 Linux 4.4.0-96-generic
gyp ERR! command "/usr/local/node/bin/node" "/usr/local/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/u/fabric-samples/fabcar/node_modules/pkcs11js
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 4.4.0-96-generic
npm ERR! argv "/usr/local/node/bin/node" "/usr/local/node/bin/npm" "run" "build"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! pkcs11js#1.0.9 build: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.9 build script 'node-gyp configure 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 pkcs11js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pkcs11js
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pkcs11js
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! Please include the following file with any support request:
npm ERR! /home/u/fabric-samples/fabcar/node_modules/pkcs11js/npm-debug.log
fabcar#1.0.0 /home/u/fabric-samples/fabcar
Thank you.
The issue was that I was missing a necessary c++ compiler. It seems it was not included in the Ubuntu minimal installation, which makes sense, but the errors seemed very opaque. Running sudo apt install build-essential g++ seems to have solved the problem.
I'm not sure if it was necessary, but I also needed to add alias sudo='sudo env PATH=$PATH' to my .bashrc file so I could run npm with sudo. That solution came from this link.