Any help is much appreciated. While installing Hyperledger composer getting the below error: - npm

ERROR RECEIVED BELOW:
npm install -g composer-cli#0.20
npm ERR! 3 errors generated.
npm ERR! make: *** [Release/obj.target/api/src/node_report.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: make failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.2.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /usr/local/lib/node_modules/composer-cli/node_modules/node-report
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok

Do not use composer. It's deprecated long time back.

Related

I cannot install vosk in npm

I want install vosk in npm but receive the following error:
npm ERR! code 1
npm ERR! path C:\Users\WINDOWS 11\node_modules\ffi-napi
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp-build
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.2.0
npm ERR! gyp info using node#16.13.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.10 found at "C:\Users\WINDOWS 11\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\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:\Users\WINDOWS 11\AppData\Roaming\nvm\v16.13.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Users\WINDOWS 11\AppData\Roaming\nvm\v16.13.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\WINDOWS 11\AppData\Roaming\nvm\v16.13.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Users\WINDOWS 11\AppData\Roaming\nvm\v16.13.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Users\WINDOWS 11\AppData\Roaming\nvm\v16.13.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack at C:\Users\WINDOWS 11\AppData\Roaming\nvm\v16.13.0\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\WINDOWS 11\AppData\Roaming\nvm\v16.13.0\node_modules\npm\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.22621
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\WINDOWS 11\\AppData\\Roaming\\nvm\\v16.13.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\WINDOWS 11\node_modules\ffi-napi
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v8.2.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\WINDOWS 11\AppData\Local\npm-cache\_logs\2023-02-19T08_18_20_209Z-debug.log

How to resolve bcrypt package error in linux system?

Hi I have cloned a nestJs project from git. To run that project , try to install the node modules using the
npm i
It prompts the error as below :
kathishkumaran#kathish-Latitude-3420:~/Documents/projects$ npm i
npm ERR! code 1
npm ERR! path /home/kathishkumaran/Documents/project/node_modules/bcrypt
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/usr/bin/node /home/kathishkumaran/.nvm/versions/node/v18.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/kathishkumaran/Documents/project/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/kathishkumaran/Documents/project/node_modules/bcrypt/lib/binding/napi-v3 --napi_version=5 --node_abi_napi=napi --napi_build_version=3' (7)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#0.10.2
npm ERR! node-pre-gyp info using node#10.19.0 | linux | x64
npm ERR! node-pre-gyp info build requesting source compile
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#10.19.0 | linux | x64
npm ERR! gyp info ok
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#10.19.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
npm ERR! gyp ERR! UNCAUGHT EXCEPTION
npm ERR! gyp ERR! stack TypeError: Object.fromEntries is not a function
npm ERR! gyp ERR! stack at Object.<anonymous> (/home/kathishkumaran/.nvm/versions/node/v18.14.0/lib/node_modules/npm/node_modules/node-gyp/node_modules/#npmcli/fs/lib/fs.js:6:23)
npm ERR! gyp ERR! stack at Module._compile (internal/modules/cjs/loader.js:778:30)
npm ERR! gyp ERR! stack at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! gyp ERR! stack at Module.load (internal/modules/cjs/loader.js:653:32)
npm ERR! gyp ERR! stack at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
npm ERR! gyp ERR! stack at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm ERR! gyp ERR! stack at Module.require (internal/modules/cjs/loader.js:692:17)
npm ERR! gyp ERR! stack at require (internal/modules/cjs/helpers.js:25:18)
npm ERR! gyp ERR! stack at Object.<anonymous> (/home/kathishkumaran/.nvm/versions/node/v18.14.0/lib/node_modules/npm/node_modules/node-gyp/node_modules/#npmcli/fs/lib/index.js:2:6)
npm ERR! gyp ERR! stack at Module._compile (internal/modules/cjs/loader.js:778:30)
npm ERR! gyp ERR! System Linux 5.14.0-1056-oem
npm ERR! gyp ERR! command "/usr/bin/node" "/home/kathishkumaran/.nvm/versions/node/v18.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/kathishkumaran/Documents/project/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/home/kathishkumaran/Documents/projects/node_modules/bcrypt/lib/binding/napi-v3" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=3"
npm ERR! gyp ERR! cwd /home/kathishkumaran/Documents/project/node_modules/bcrypt
npm ERR! gyp ERR! node -v v10.19.0
npm ERR! gyp ERR! node-gyp -v v9.3.0
npm ERR! gyp ERR! Node-gyp failed to build your package.
npm ERR! gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /home/kathishkumaran/.nvm/versions/node/v18.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/kathishkumaran/Documents/project/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/kathishkumaran/Documents/projects/node_modules/bcrypt/lib/binding/napi-v3 --napi_version=5 --node_abi_napi=napi --napi_build_version=3' (7)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/lib/nodejs/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13)
npm ERR! node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
npm ERR! node-pre-gyp ERR! System Linux 5.14.0-1056-oem
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/usr/bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/kathishkumaran/Documents/projects/node_modules/bcrypt
npm ERR! node-pre-gyp ERR! node -v v10.19.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.10.2
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kathishkumaran/.npm/_logs/2023-02-15T17_35_42_847Z-debug-0.log
I have tried uninstalling the bcrypt package with the npm uninstall bcrypt command and tried npm i but it showed the same error.
Please help me fixing this issue with bcrypt package in nestJs application in ubuntu system.

I am unable to install truffle. Keeps loading up a list of errors

I tried installing truffle through the VSCode terminal.
After pressing npm install -g truffle it loads for a while then displays the following erros
npm ERR! code 1
npm ERR! path C:\Users\User\AppData\Roaming\npm\node_modules\truffle\node_modules\ganache\node_modules\#trufflesuite\bigint-buffer
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#8.4.1
npm ERR! gyp info using node#16.14.2 | win32 | x64
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if Python is C:\Users\User\AppData\Local\Programs\Python\Python39\python.exe
...
xe" could not be run
npm ERR! gyp ERR! find Python checking if the py launcher can be used to find Python 3
npm ERR! gyp ERR! find Python - "py.exe" is not in PATH or produced an error
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:330:47)
npm ERR! gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:159:21)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:228:18)
npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:294:16)npm ERR! gyp ERR! stack at exithandler (node:child_process:406:5)
npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:418:5)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:478:16)
npm ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
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\User\AppData\Roaming\npm\node_modules\truffle\node_modules\ganache\node_modules\#trufflesuite\bigint-buffer
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache\_logs\2022-04-11T15_21_46_199Z-debug-0.log
How can I fix this, please? I have installed the package 4 times and the error keep showing up.

GYP issue installing yo hyperledger

I can't install hyperledger on windows 10 using VSCode because I keep getting a error when I try to install the generator with Yo.
This is the error:
\AppData\Roaming\npm\node_modules\generator-hyperledger-composer\node_modules\pkcs11js>if not defined npm_config_node_gyp
(node "C:\Program Files (x86)\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 (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
The system cannot find the path specified.
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\program files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Robert\AppData\Roaming\npm\node_modules\generator-hyperledger-composer\node_modules\pkcs11js
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pkcs11js#1.0.17 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.17 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Thanks for the help!

hiredis install rebuild fail

I'm trying to install hiredis through npm on a mac and I am getting this error. I know there are some possible duplicates of this but I've tried other solutions and they have not worked for me. Here is the log:
11 warnings and 17 errors generated.
make: *** [Release/obj.target/hiredis/src/hiredis.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:258: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 16.7.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/Aric/myApp/node_modules/hiredis
gyp ERR! node -v v6.10.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hiredis#0.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hiredis#0.3.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Maybe not the correct way to fix my problem but I upgraded hiredis to v0.5.0 from v0.3.0 and it solved the issue for me.