Installing web3 for Ethereum error - javascript

I'm using MacOS and is trying to install web3. I'm getting this error response message which I'm not sure how to resolve.
I have other code editors installed in my mac, and currently I'm learning how to do some blockchain development. Would be really helpful if someone could assist me in this. Thanks!
npm WARN deprecated fs-promise#2.0.3: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated tar.gz#1.0.7: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
> scrypt#6.0.3 preinstall /Users/HTT/inbox/node_modules/scrypt
> node node-scrypt-preinstall.js
> scrypt#6.0.3 install /Users/HTT/inbox/node_modules/scrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/anaconda3/bin/python" is v3.6.4, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at PythonFinder.failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:492:19)
gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:474:14)
gyp ERR! stack at ChildProcess.exithandler (child_process.js:267:7)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:346:11)
gyp ERR! stack at emitOne (events.js:116:13)
gyp ERR! stack at Socket.emit (events.js:211:7)
gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:567:12)
gyp ERR! System Darwin 17.5.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 /Users/HTT/inbox/node_modules/scrypt
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN inbox#1.0.0 No description
npm WARN inbox#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt#6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt#6.0.3 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! /Users/HTT/.npm/_logs/2018-04-26T14_03_17_140Z-debug.log

I fixed it by specifying the version. Not really a "fix", but working with stable releases is something I can get behind
npm install -g web3#0.20.6
I have also seen that this will do the trick
npm install ethereum/web3.js

You can use this command to check the python version :
python --version
Because you need to use node-gyp, it is recommended to install python2.7.

Related

Distributed computing: Boomerang.js issues installing using npm

I am doing a project about grid computing using Javascript. Boomerang.js is a middleware for distributed computing, and I wish to install its server(https://github.com/bergos/boomerang-server).
When I try to do so, errors occure when using npm install to install dependencies.
I tried following the install guide on this website (https://www.boomerangjs.org). This leads me to giving the following commands to the terminal.
npm install boomerang-server
cd node_modules/boomerang-server
npm start
I get an error running npm install boomerang-server, and the folder boomerang-server is not created as exptected. The error-log is found below.
I would appreciate some guidance on how to solve the problem. Thank you in advance!
C:\Users\Bruger>npm install boomerang-server
npm WARN deprecated rdf-interfaces#0.1.1: This package is no longer maintained. Please upgrade to the latest version of rdf-ext.
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated xmldom#0.1.19: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated uuid#2.0.3: 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 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 WARN deprecated mkdirp#0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated connect#2.30.2: connect 2.x series is deprecated
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\Bruger\\node_modules\\boomerang-client',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\Bruger\node_modules\boomerang-client\node_modules'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\Bruger\\node_modules\\boomerang-client\\node_modules'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\Bruger\node_modules\contextify
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#9.3.0
npm ERR! gyp info using node#18.14.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.11.0 found at "C:\Users\Bruger\AppData\Local\Programs\Python\Python311\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 use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
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\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\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\node-gyp\lib\find-visualstudio.js:369:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\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\node-gyp\lib\find-visualstudio.js:390:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:427:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\Bruger\node_modules\contextify
npm ERR! gyp ERR! node -v v18.14.0
npm ERR! gyp ERR! node-gyp -v v9.3.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Bruger\AppData\Local\npm-cache\_logs\2023-02-15T13_18_16_053Z-debug-0.log
I get an error running npm install boomerang-server, and the folder boomerang-server is not created as exptected. I would appreciate some guidance on how to solve the problem. Thank you in advance!
Unfortunately, I think the best solution would be to look for some other software for your project than boomerang.
boomerang-server hasn't been updated in 8 years. Chances that you can run it these days (especially with Node 18) are very slim.
The boomerang-server GitHub repository has been archived in mid-2022, and the boomerangjs Twitter account last tweeted in 2015. The project seems dead as a doorstop.

How do I fix johnny 5 installation error?

I'm trying to install johnny-five on windows7 64 bit. I have an earlier version of Node (v.13.14.0-64) installed and I use Visual Studio Code as my code editor.
Regarding the first part of the error, prebuild-install WARN install No prebuilt binaries found (target=13.14.0 runtime=node arch=x64 libc= platform=win32). I simply don't know what this means even after reading forums about this error.
I have Python installed and the error says it can't find it. I went to this website trying to fix the error but still wasn't able to find a solution.
> #serialport/bindings#8.0.8 install C:\Users\HP\Documents\GitHub\NODE\node_modules\#serialport\bindings
> prebuild-install --tag-prefix #serialport/bindings# || node-gyp rebuild
prebuild-install WARN install No prebuilt binaries found (target=13.14.0 runtime=node arch=x64 libc= platform=win32)
C:\Users\HP\Documents\GitHub\NODE\node_modules\#serialport\bindings>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )
else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - "C:\Python27\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Python37\python.exe
gyp ERR! find Python - "C:\Python37\python.exe" could not be run
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
gyp ERR! stack at exithandler (child_process.js:310:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:322:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:467:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\HP\Documents\GitHub\NODE\node_modules\#serialport\bindings
gyp ERR! node -v v13.14.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\HP\Documents\GitHub\NODE\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\HP\Documents\GitHub\NODE\package.json'
npm WARN NODE No description
npm WARN NODE No repository field.
npm WARN NODE No README data
npm WARN NODE No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #serialport/bindings#8.0.8 (node_modules\#serialport\bindings):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #serialport/bindings#8.0.8 install: `prebuild-install --tag-prefix #serialport/bindings# || node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ johnny-five#2.1.0
updated 1 package and audited 101 packages in 8.473s
5 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Any help is appreciated.

node-pre-gyp install --fallback-to-build

When I install bcrypt module for my hapi js project it is not installed and it's shows something like
node-pre-gyp install --fallback-to-build
I tried to install by running;
npm i node-pre-gyp
but it's not working.
Error:
PS C:\Users\safras\Desktop\authentication\loginLogout> npm i bcrypt
> bcrypt#3.0.6 install C:\Users\safras\Desktop\authenticatin\node_modules\bcrypt
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.6/bcrypt_lib-v3.0.6-node-v72-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt#3.0.6 and node#12.10.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
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 checking VS2019 (16.3.29411.108) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp ERR! find VS - "Visual Studio C++ core features" missing
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
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 https://github.com/nodejs/node-gyp#on-windows
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:344: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:365: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:302:5)
gyp ERR! stack at ChildProcess.emit (events.js:209:13)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
gyp ERR! System Windows_NT 10.0.18362
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\\safras\\Desktop\\authentication\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\safras\\Desktop\\authentication\\node_modules\\bcrypt\\lib\\binding" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0"
"--node_napi_label=node-v72"
gyp ERR! cwd C:\Users\safras\Desktop\authentication\node_modules\bcrypt
gyp ERR! node -v v12.10.0
gyp ERR! node-gyp -v v5.0.3
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
--module=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding\bcrypt_lib.node
--module_name=bcrypt_lib --module_path=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding
--napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\safras\Desktop\authentication\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:209:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Windows_NT 10.0.18362
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\safras\\Desktop\\authentication\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\safras\Desktop\authentication\node_modules\bcrypt
node-pre-gyp ERR! node -v v12.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build
--module=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding\bcrypt_lib.node
--module_name=bcrypt_lib --module_path=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding
--napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN hapi-auth-basic#5.0.0 requires a peer of hapi#>=17.x.x but none is installed. You must install peer dependencies yourself.
npm WARN authentication#1.0.0 No description
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt#3.0.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#3.0.6 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\safras\AppData\Roaming\npm-cache\_logs\2019-10-18T06_32_05_741Z-debug.log
PS C:\Users\safras\Desktop\authentication\loginLogout> npm i node-pre-gyp
npm WARN hapi-auth-basic#5.0.0 requires a peer of hapi#>=17.x.x but none is installed. You must install peer dependencies yourself.
npm WARN authentication#1.0.0 No description
npm WARN authentication#1.0.0 No repository field.
+ node-pre-gyp#0.13.0
added 4 packages from 8 contributors, removed 1 package and audited 244 packages in 2.057s
found 0 vulnerabilities
PS C:\Users\safras\Desktop\authentication\loginLogout> #hapi/hapi -v
At line:1 char:7
+ #hapi/hapi -v
+ ~
PS C:\Users\safras\Desktop\authentication\loginLogout> npm install -g node-gyp
C:\Users\safras\AppData\Roaming\npm\node-gyp -> C:\Users\safras\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js
+ node-gyp#6.0.0
updated 1 package in 5.76s
PS C:\Users\safras\Desktop\authentication\loginLogout> npm i bcrypt
bcrypt#3.0.6 install C:\Users\safras\Desktop\authentication\node_modules\bcrypt
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.6/bcrypt_lib-v3.0.6-node-v72-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt#3.0.6 and node#12.10.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
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 checking VS2019 (16.3.29411.108) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp ERR! find VS - "Visual Studio C++ core features" missing
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
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 https://github.com/nodejs/node-gyp#on-windows
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:344: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:365: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:302:5)
gyp ERR! stack at ChildProcess.emit (events.js:209:13)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
gyp ERR! System Windows_NT 10.0.18362
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\\safras\\Desktop\\authentication\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\safras\\Desktop\\authentication\\node_modules\\bcrypt\\lib\\binding" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0"
"--node_napi_label=node-v72"
gyp ERR! cwd C:\Users\safras\Desktop\authentication\node_modules\bcrypt
gyp ERR! node -v v12.10.0
gyp ERR! node-gyp -v v5.0.3
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
--module=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding\bcrypt_lib.node
--module_name=bcrypt_lib --module_path=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding
--napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\safras\Desktop\authentication\node_modules\bcrypt\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:209:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Windows_NT 10.0.18362
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\safras\\Desktop\\authentication\\node_modules\\bcrypt\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\safras\Desktop\authentication\node_modules\bcrypt
node-pre-gyp ERR! node -v v12.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build
--module=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding\bcrypt_lib.node
--module_name=bcrypt_lib --module_path=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding
--napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN hapi-auth-basic#5.0.0 requires a peer of hapi#>=17.x.x but none is installed. You must install peer dependencies yourself.
npm WARN authentication#1.0.0 No description
npm WARN authentication#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt#3.0.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!enter code here
npm ERR! Failed at the bcrypt#3.0.6 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\safras\AppData\Roaming\npm-cache\_logs\2019-10-18T06_35_24_418Z-debug.log
try to uninstall bcrypt and install bcryptjs
npm install --save bcryptjs && npm uninstall --save bcrypt
I'd suggest you use bcryptjs
This is probably because you are not ysing a stable version of node. Check the docs on npm here
node-gyp only works with stable/released versions of node. Since the bcrypt module uses node-gyp to build and install, you'll need a stable version of node to use bcrypt. If you do not, you'll likely see an error that starts with:
gyp ERR! stack Error: "pre" versions gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
if you want bcrypt than
npm install --build-from-resource
if above command doesnt fix your issue than it could be issue with fsevents ((only if you are using it)) so for this run
npm install fsevents
if yet problem persist than it is issue with your node version and grpc version please click here for more info

NPM installs keep throwing errors

I am a react beginner trying to figure out how to build components but I cannot get my page running while trying to follow this tutorial. https://www.youtube.com/watch?v=aK3aUW08YGw&list=PLEsfXFp6DpzQbwYDx1zgcKJ4tzyWFaESK&index=25When I try to npm install dropzone I'm greeted with a huge list of error messages. Then when i type npm list dropzone, the tree appears empty. Here's the error log:
adampease-> npm install --save react-dropzone
> fsevents#1.2.4 install /Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents
> node install
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for fsevents#1.2.4 and node#11.10.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:297:12)
gyp ERR! stack at ChildProcess.emit (events.js:197:13)
gyp ERR! stack at maybeClose (internal/child_process.js:984:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:401:11)
gyp ERR! stack at Socket.emit (events.js:197:13)
gyp ERR! stack at Pipe._handle.close (net.js:611:12)
gyp ERR! System Darwin 16.3.0
gyp ERR! command "/Users/adampease/.nvm/versions/node/v11.10.0/bin/node" "/Users/adampease/.nvm/versions/node/v11.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=4" "--node_abi_napi=napi"
gyp ERR! cwd /Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents
gyp ERR! node -v v11.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/adampease/.nvm/versions/node/v11.10.0/bin/node /Users/adampease/.nvm/versions/node/v11.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:197:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:984:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 16.3.0
node-pre-gyp ERR! command "/Users/adampease/.nvm/versions/node/v11.10.0/bin/node" "/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents
node-pre-gyp ERR! node -v v11.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
Failed to execute '/Users/adampease/.nvm/versions/node/v11.10.0/bin/node /Users/adampease/.nvm/versions/node/v11.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
npm WARN ts-pnp#1.0.0 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/react-scripts/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ react-dropzone#8.1.0
updated 1 package and audited 36308 packages in 22.039s
found 63 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
I faced these issue due to having Python 3.0 installed on my machine. I downgraded it to Python 2.7 and it worked.

What are necessary configuration require to get mean.js scaffolding via yo generator?

I have following versions of libraries.
`
nurv#nurvcoder:~/Node/demo$ node --version
v5.0.0
nurv#nurvcoder:~/Node/demo$ nodejs --version
v0.10.40
nurv#nurvcoder:~/Node/demo$ mean --version
0.10.14
nurv#nurvcoder:~/Node/demo$ yo --version
1.5.0
nurv#nurvcoder:~/Node/demo$ grunt --version
grunt-cli v0.1.13
nurv#nurvcoder:~/Node/demo$ bower --version
1.6.5
nurv#nurvcoder:~/Node/demo$ npm --version
3.3.12`
When I used yo generator to create the mean application
`
nurv#nurvcoder:~/Node/demo$ sudo yo meanjs`
`You're using the official MEAN.JS generator.
?What mean.js version would you like to generate?
`
`>0.4.0
0.4.1`
And following error was thrown
`npm WARN engine karma#0.12.37: wanted: {"node":">=0.8 <=0.12 || >=1 <=2"} (current: {"node":"5.0.0","npm":"3.3.12"})
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN prefer global jshint#2.8.0 should be installed with -g
npm WARN prefer global node-gyp#3.0.3 should be installed with -g
npm WARN prefer global nodemon#1.3.8 should be installed with -g
npm WARN prefer global node-inspector#0.10.2 should be installed with -g
make: g++: Command not found
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 127
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:270:23)
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:200:12)
gyp ERR! System Linux 3.19.0-32-generic
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 /home/satish/Node/demo/mean/node_modules/bufferutil
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:bufferutil#1.2.1 bufferutil#1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil#1.2.1 Exit status 1
make: g++: Command not found
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 127
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:270:23)
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:200:12)
gyp ERR! System Linux 3.19.0-32-generic
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 /home/nurv/Node/demo/mean/node_modules/node-inspector/node_modules/bufferutil
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:bufferutil#1.1.0 bufferutil#1.1.0 install: `node-gyp rebuild`
npm WARN install:bufferutil#1.1.0 Exit status 1
make: g++: Command not found
make: *** [Release/obj.target/validation/src/validation.o] Error 127
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:270:23)
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:200:12)
gyp ERR! System Linux 3.19.0-32-generic
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 /home/satish/Node/demo/mean/node_modules/node-inspector/node_modules/utf-8-validate
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
`
A proper guidance to resolve this problem would be a great help.

Categories