I have started my project and I have started installing packages but suddenly I got an error and that error comes when I try to install a bcrypt.
first I try to install bcrypt.
npm install bcrypt
I got an error.
> bcrypt#3.0.7 install C:\Users\Abdulsalam\application\clothes_store\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.7/bcrypt_lib-v3.0.7-node-v64-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt#3.0.7 and node#10.15.3 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Abdulsalam\AppData\Local\Programs\Python\Python36\python.EXE -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:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
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\\Abdulsalam\\application\\clothes_store\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\Abdulsalam\\application\\clothes_store\\node_modules\\bcrypt\\lib\\binding" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd C:\Users\Abdulsalam\application\clothes_store\node_modules\bcrypt
gyp ERR! node -v v10.15.3
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 '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\Abdulsalam\application\clothes_store\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\Abdulsalam\application\clothes_store\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\Abdulsalam\application\clothes_store\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Windows_NT 10.0.18362
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Abdulsalam\\application\\clothes_store\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Abdulsalam\application\clothes_store\node_modules\bcrypt
node-pre-gyp ERR! node -v v10.15.3
node-pre-gyp ERR! node-pre-gyp -v v0.13.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\Abdulsalam\application\clothes_store\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\Abdulsalam\application\clothes_store\node_modules \bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
npm WARN clothes_store#1.0.0 No description
npm WARN clothes_store#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt#3.0.7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#3.0.7 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\Abdulsalam\AppData\Roaming\npm-cache\_logs\2019-12-09T18_07_53_927Z-debug.log
Sorry It's a long error but I hope someone helps me because I have to finish this project very quickly
and I haven't started yet.
If you're using windows, you need to use bcryptjs via:
npm install --save bcryptjs
You are facing some of the error described inside the bcrypt package. I advice you to go to their npm page and read through the description.
They have a paragraph where they describe:
IF you have an error like this:
node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v48-linux-x64.tar.gz
make sure you have the appropriate dependencies installed and configured for your platform. You can find installation instructions for the dependencies for some common platforms in this page.
So I just advice you to go to their page and follow the instructions..
Related
I am trying to install electron in my project, but it seems that there is a conflict with sqlite3 and I have not been able to solve it. Here is the log. I trying this:
"scripts": {
"postinstall": "install-app-deps"
...
}
npm install --save-dev electron-builder
npm install --save sqlite3
npm run postinstall
install-app-deps
• please use as subcommand: electron-builder install-app-deps
• electron-builder version=22.3.2
• rebuilding native dependencies dependencies=sqlite3#4.1.1 platform=win32 arch=x64
⨯ cannot execute cause=exit status 1
out=
> sqlite3#4.1.1 install C:\Users\devel\Documents\Proyectos\Virtual_Assistant\node_modules\sqlite3
> node-pre-gyp install --fallback-to-build
Los proyectos de esta soluci�n se van a compilar de uno en uno. Para habilitar la compilaci�n en paralelo, agregue el modificador "/m".
unpack_sqlite_dep
El sistema no puede encontrar la ruta especificada.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" sali� con el c�digo 1. [C:\Users\devel\Documents\Proyectos\Virtual_Assistant\node_modules\sqlite3\build\deps\action_before_build.vcxproj]
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\devel\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\devel\Documents\Proyectos\Virtual_Assistant\node_modules\sqlite3\lib\binding\electron-v8.0-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\devel\Documents\Proyectos\Virtual_Assistant\node_modules\sqlite3\lib\binding\electron-v8.0-win32-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=electron-v8.0' (1)
errorOut=node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.1/electron-v8.0-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3#4.1.1 and electron#8.0.1 (electron-v8.0 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\devel\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\devel\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\devel\\Documents\\Proyectos\\Virtual_Assistant\\node_modules\\sqlite3\\lib\\binding\\electron-v8.0-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\Users\\devel\\Documents\\Proyectos\\Virtual_Assistant\\node_modules\\sqlite3\\lib\\binding\\electron-v8.0-win32-x64" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=electron-v8.0"
gyp ERR! cwd C:\Users\devel\Documents\Proyectos\Virtual_Assistant\node_modules\sqlite3
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.7
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:\Users\devel\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\devel\Documents\Proyectos\Virtual_Assistant\node_modules\sqlite3\lib\binding\electron-v8.0-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\devel\Documents\Proyectos\Virtual_Assistant\node_modules\sqlite3\lib\binding\electron-v8.0-win32-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=electron-v8.0' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\devel\Documents\Proyectos\Virtual_Assistant\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:210:5)
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\\devel\\Documents\\Proyectos\\Virtual_Assistant\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\devel\Documents\Proyectos\Virtual_Assistant\node_modules\sqlite3
node-pre-gyp ERR! node -v v12.13.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3#4.1.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3#4.1.1 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\devel\AppData\Roaming\npm-cache\_logs\2020-02-23T18_00_38_702Z-debug.log
command='C:\Program Files\nodejs\node.exe' 'C:\Users\devel\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js' rebuild sqlite3#4.1.1
workingDir=
Error: C:\Users\devel\Documents\Proyectos\Virtual_Assistant\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (C:\Users\devel\Documents\Proyectos\Virtual_Assistant\node_modules\app-builder-lib\node_modules\builder-util\src\util.ts:239:14)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Virtual_Assistant#1.2.0 postinstall: `install-app-deps`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Virtual_Assistant#1.2.0 postinstall 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\devel\AppData\Roaming\npm-cache\_logs\2020-02-23T18_00_38_871Z-debug.log
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
I'm trying to npm install (note: via lerna bootstrap) a project in Ubuntu 18.04. I face an error (npm ERR! bcrypt#3.0.6 install: node-pre-gyp install --fallback-to-build
) and could not move forward.
I've tried installing node-gyp, node-pre-gyp and apt-get build-essentials as well, believing it could be because of C++ compilation issue, but no luck.
Versions:
Node: v10.16.0
NPM: 6.9.0
ren#renish:~/Src/company$ sudo npm run bootstrap
npm WARN lifecycle The node binary used for scripts is /bin/node but npm is using /snap/node/2485/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> company# bootstrap /home/ren/Src/company
> npm install && npx lerna bootstrap
npm WARN company# No repository field.
npm WARN company# No license field.
audited 43804 packages in 3.726s
found 41 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
lerna notice cli v3.15.0
lerna info Bootstrapping 7 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in 'company_api'
lerna ERR! npm install stdout:
> bcrypt#3.0.6 install /home/ren/Src/company/packages/api/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
Failed to execute '/snap/node/2485/bin/node /snap/node/2485/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/ren/Src/company/packages/api/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/ren/Src/company/packages/api/node_modules/bcrypt/lib/binding --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
lerna ERR! npm install stderr:
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for bcrypt#3.0.6 and node#10.16.1 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/home/ren/Src/company/packages/api/node_modules/bcrypt/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/ren/Src/company/packages/api/node_modules/bcrypt/build'
gyp ERR! System Linux 5.0.0-25-generic
gyp ERR! command "/snap/node/2485/bin/node" "/snap/node/2485/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/ren/Src/company/packages/api/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/home/ren/Src/company/packages/api/node_modules/bcrypt/lib/binding" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /home/ren/Src/company/packages/api/node_modules/bcrypt
gyp ERR! node -v v10.16.1
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 '/snap/node/2485/bin/node /snap/node/2485/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/ren/Src/company/packages/api/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/ren/Src/company/packages/api/node_modules/bcrypt/lib/binding --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/ren/Src/company/packages/api/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 5.0.0-25-generic
node-pre-gyp ERR! command "/snap/node/2485/bin/node" "/home/ren/Src/company/packages/api/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/ren/Src/company/packages/api/node_modules/bcrypt
node-pre-gyp ERR! node -v v10.16.1
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
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! /home/ren/.npm/_logs/2019-08-16T13_52_33_286Z-debug.log
lerna ERR! npm install exited 1 in 'company_api'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! company# bootstrap: `npm install && npx lerna bootstrap`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the company# bootstrap script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ren/.npm/_logs/2019-08-16T13_52_33_951Z-debug.log
Could someone throw some light on this?
Well this is a version AND a access problem is pretty clear in the error message. changing the permission is one step but it looks like you need to update your:
node
gyp ERR! node -v v10.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
and also your system linux version for some reason :
gyp ERR! System Linux 5.0.0-25-generic
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.
I am using npm i node-openalpr to install , but i am getting error like :
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp ERR! UNCAUGHT EXCEPTION node-pre-gyp ERR! stack Error:
node-openalpr package.json is not node-pre-gyp ready: node-pre-gyp
ERR! stack package.json must declare these properties: node-pre-gyp
ERR! stack binary.host node-pre-gyp ERR! stack at validate_config
(C:\Sahal
KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\lib\util\versioning.js:220:15)
node-pre-gyp ERR! stack at Object.module.exports.evaluate
(C:\Sahal
KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\lib\util\versioning.js:279:5)
node-pre-gyp ERR! stack at handle_gyp_opts (C:\Sahal
KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\lib\util\handle_gyp_opts.js:60:27) node-pre-gyp ERR! stack at configure (C:\Sahal
KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\lib\configure.js:12:5)
node-pre-gyp ERR! stack at C:\Sahal
KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\lib\build.js:43:13
node-pre-gyp ERR! stack at ChildProcess. (C:\Sahal
KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\lib\util\compile.js:85:9)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13) node-pre-gyp
ERR! stack at ChildProcess.emit (events.js:214:7) node-pre-gyp
ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:209:5) node-pre-gyp ERR! System Windows_NT
10.0.17134 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Sahal
KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\bin\node-pre-gyp"
"install" "--build-from-source" "--fallback-to-build" node-pre-gyp
ERR! cwd C:\Sahal KA\ANPR\node_modules\node-openalpr node-pre-gyp ERR!
node -v v8.11.3 node-pre-gyp ERR! node-pre-gyp -v v0.11.0 node-pre-gyp
ERR! This is a bug in node-pre-gyp. node-pre-gyp ERR! Try to update
node-pre-gyp and file an issue if it does not help: node-pre-gyp ERR!
https://github.com/mapbox/node-pre-gyp/issues npm ERR! code
ELIFECYCLE npm ERR! errno 7 npm ERR! node-openalpr#1.1.1 install:
node-pre-gyp install --build-from-source --fallback-to-build npm
ERR! Exit status 7 npm ERR! npm ERR! Failed at the node-openalpr#1.1.1
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\ADMIN\AppData\Roaming\npm-cache_logs\2018-10-22T08_18_59_445Z-debug.log
The version of node-pre-gyp used in the node-openalpr module points to the node-pre-gyp repo, meaning that on install it will try to use the most up to date version of node-pre-gyp which is far newer than the version used in the node-openalpr module.
There is a fork of the node-openalpr module which specifies a commit hash for node-pre-gyp in the package.json like so:
"node-pre-gyp": "https://github.com/mapbox/node-pre-gyp.git#8036d17"
this can be found here :
https://github.com/bameyrick/node-openalpr
and can be added to your project using yarn add https://github.com/bameyrick/node-openalpr
How to install module directly from GitHub if you prefer using npm - https://stackoverflow.com/questions/17509669/how-to-install-an-npm-package-from-github-directly