unable to install firebase-tools using npm - javascript

i am trying to install firebase-tools for my android studio project but its causing me the following error`
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>npm install -g firebase-tools
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
C:\Users\jay\AppData\Roaming\npm\firebase -> C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\bin\firebase
node-zopfli#1.4.0 install C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli
node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(403): https://node-zopfli.s3.amazonaws.com/Release/zopfli-v1.4.0-node-v48-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for node-zopfli#1.4.0 and node#6.11.2 (node-v48 ABI) (falling back to source compile with node-gyp)
C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node "" clean )
C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli\lib\binding\node-v48-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli\lib\binding\node-v48-win32-x64 ) else (node "" configure --fallback-to-build --module=C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli\lib\binding\node-v48-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli\lib\binding\node-v48-win32-x64 )
C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" build --fallback-to-build --module=C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli\lib\binding\node-v48-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli\lib\binding\node-v48-win32-x64 ) else (node "" build --fallback-to-build --module=C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli\lib\binding\node-v48-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli\lib\binding\node-v48-win32-x64 )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error
MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK vers
ion in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\jay\Ap
pData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli\build\zopfli.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\jay\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\node_modules\\node-zopfli\\lib\\binding\\node-v48-win32-x64\\zopfli.node" "--module_name=zopfli" "--module_path=C:\\Users\\jay\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\node_modules\\node-zopfli\\lib\\binding\\node-v48-win32-x64"
gyp ERR! cwd C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli
gyp ERR! node -v v6.11.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli\lib\binding\node-v48-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli\lib\binding\node-v48-win32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:891:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 10.0.15063
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jay\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli
node-pre-gyp ERR! node -v v6.11.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli\lib\binding\node-v48-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\jay\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\node-zopfli\lib\binding\node-v48-win32-x64' (1)
C:\Users\jay\AppData\Roaming\npm
`-- firebase-tools#3.9.2
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-zopfli#1.4.0 (node_modules\firebase-tools\node_modules\node-zopfli):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-zopfli#1.4.0 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
C:\WINDOWS\system32>

From your warning message, node-uuid is deprecated so just uninstall it and use uuid instead.
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
Try this way,
npm uninstall --save node-uuid
npm install --save uuid

Related

npm i Error: `gyp` failed with exit code: 1

I am trying to install modules on Windows 10 using npm 6.14.13 When I enter npm i I get:
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:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:376:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.18363
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" "configure" "--fallback-to-build" "--module=C:\\Users\\קלמן\\SellersLog\\sellerslog-server\\node_modules\\canvas\\build\\Release\\canvas.node" "--module_name=canvas" "--module_path=C:\\Users\\קלמן\\SellersLog\\sellerslog-server\\node_modules\\canvas\\build\\Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd C:\Users\קלמן\SellersLog\sellerslog-server\node_modules\canvas
gyp ERR! node -v v14.17.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\קלמן\SellersLog\sellerslog-server\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\קלמן\SellersLog\sellerslog-server\node_modules\canvas\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\קלמן\SellersLog\sellerslog-server\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:376:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1055:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\קלמן\\SellersLog\\sellerslog-server\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\קלמן\SellersLog\sellerslog-server\node_modules\canvas
node-pre-gyp ERR! node -v v14.17.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\קלמן\Sellenode_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN rollback Rolling back debug#3.2.6 failed (this is probably harmless): EPERM: operation not permitted, scandir 'C:\Users\קלמן\SellersLog\sellerslog-server\node_modules\needle\node_modules'
npm WARN sellerslog-server#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas#2.6.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas#2.6.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I also get this beforehand, don't know if this is important:
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v83-win32-unknown-ia32.tar.gz
node-pre-gyp WARN Pre-built binaries not found for canvas#2.6.1 and node#14.17.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
note: already tried windows-build-tools - didn't work for me
Based on
canvas-v2.6.1-node-v83-win32-unknown-ia32.tar.gz
and
C:\Program Files (x86)\nodejs\node.exe
you're using a 32-bit Node.js.
Based on this list, prebuilt node-canvas binaries exist only for 64-bit Node.js binaries.
I'd recommend to uninstall your 32-bit Node.js and install a 64-bit one instead.

How do is solve the problem with installing the node.js sqlite3 package?

When I install the sqlite3 package for a node.js by npm install sqlite3 in command prompt and Error appears,
to watch error presshereto show image
,this Error in below:
C:\Windows\system32>npm install sqlite3
npm WARN deprecated
request#2.88.2: request has been deprecated, see
https://github.com/request/request/issues/3142 npm WARN deprecated
har-validator#5.1.5: this library is no longer supported
sqlite3#5.0.1 install C:\Windows\system32\node_modules\sqlite3
node-pre-gyp install --fallback-to-build
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/v5.0.1/napi-v6-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3#5.0.1 and
node#14.15.4 (node-v83 ABI, unknown) (falling back to source compile
with node-gyp) gyp ERR! find VS gyp ERR! find VS msvs_version was set
from command line or npm config gyp ERR! find VS - looking for Visual
Studio version 2017 gyp ERR! find VS VCINSTALLDIR not set, not running
in VS Command Prompt gyp ERR! find VS could not use PowerShell to find
Visual Studio 2017 or newer 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 valid versions for msvs_version: 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:\Windows\System32\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at
C:\Windows\System32\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013
(C:\Windows\System32\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack at
C:\Windows\System32\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack at
C:\Windows\System32\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack at
C:\Windows\System32\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at
C:\Windows\System32\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler
(child_process.js:315:5) gyp ERR! stack at ChildProcess.emit
(events.js:315:20) gyp ERR! stack at maybeClose
(internal/child_process.js:1048:16) gyp ERR! System Windows_NT
10.0.19041 gyp ERR! command "C:\Windows\system32\node.exe" "C:\Windows\System32\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js"
"configure" "--fallback-to-build"
"--module=C:\Windows\system32\node_modules\sqlite3\lib\binding\napi-v6-win32-x64\node_sqlite3.node" "--module_name=node_sqlite3"
"--module_path=C:\Windows\system32\node_modules\sqlite3\lib\binding\napi-v6-win32-x64"
"--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=6"
"--node_napi_label=napi-v6" "--python=/path/to/executable/python"
"--msvs_version=2017" gyp ERR! cwd
C:\Windows\system32\node_modules\sqlite3 gyp ERR! node -v v14.15.4 gyp
ERR! node-gyp -v v5.1.0 gyp ERR! not ok node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute
'C:\Windows\system32\node.exe
C:\Windows\System32\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
configure --fallback-to-build
--module=C:\Windows\system32\node_modules\sqlite3\lib\binding\napi-v6-win32-x64\node_sqlite3.node
--module_name=node_sqlite3 --module_path=C:\Windows\system32\node_modules\sqlite3\lib\binding\napi-v6-win32-x64
--napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6 --python=/path/to/executable/python --msvs_version=2017' (1) node-pre-gyp ERR! stack at ChildProcess.
(C:\Windows\System32\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose
(internal/child_process.js:1048:16) node-pre-gyp ERR! stack at
Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Windows_NT 10.0.19041 node-pre-gyp ERR!
command "C:\Windows\system32\node.exe"
"C:\Windows\System32\node_modules\node-pre-gyp\bin\node-pre-gyp"
"install" "--fallback-to-build" node-pre-gyp ERR! cwd
C:\Windows\system32\node_modules\sqlite3 node-pre-gyp ERR! node -v
v14.15.4 node-pre-gyp ERR! node-pre-gyp -v v0.11.0 node-pre-gyp ERR!
not ok Failed to execute 'C:\Windows\system32\node.exe
C:\Windows\System32\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
configure --fallback-to-build
--module=C:\Windows\system32\node_modules\sqlite3\lib\binding\napi-v6-win32-x64\node_sqlite3.node
--module_name=node_sqlite3 --module_path=C:\Windows\system32\node_modules\sqlite3\lib\binding\napi-v6-win32-x64
--napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6 --python=/path/to/executable/python --msvs_version=2017' (1) npm WARN enoent ENOENT: no such file or directory, open 'C:\Windows\system32\package.json' npm WARN system32
No description npm WARN system32 No repository field. npm WARN
system32 No README data npm WARN system32 No license field.
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sqlite3#5.0.1
install: node-pre-gyp install --fallback-to-build npm ERR! Exit
status 1 npm ERR! npm ERR! Failed at the sqlite3#5.0.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\Amjad\AppData\Roaming\npm-cache_logs\2021-02-04T16_21_25_568Z-debug.log
C:\Windows\system32>

unable to install bcrypt on an ipv6 only host on ubuntu 20.0

this worked fine for an ipv4 supporting host, when I got the ipv6 only hosts from vultr.com
Its causing an issue.
in my package.json I've got the following line for bcrypt
"bcrypt": "^5.0.0",
when running npm I'm getting the following failures.
> bcrypt#5.0.0 install /var/www/production/source/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for bcrypt#5.0.0 and node#14.15.0 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error connect ENETUNREACH 140.82.112.4:443 - Local (0.0.0.0:0)
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ENETUNREACH 104.20.23.46:443 - Local (0.0.0.0:0)
gyp ERR! stack at internalConnect (net.js:921:16)
gyp ERR! stack at defaultTriggerAsyncIdScope (internal/async_hooks.js:429:12)
gyp ERR! stack at GetAddrInfoReqWrap.emitLookup [as callback] (net.js:1064:9)
gyp ERR! stack at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:8)
gyp ERR! System Linux 5.8.0-25-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/var/www/production/source/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/var/www/production/source/node_modules/bcrypt/lib/binding/napi-v3" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd /var/www/production/source/node_modules/bcrypt
gyp ERR! node -v v14.15.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/var/www/production/source/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/var/www/production/source/node_modules/bcrypt/lib/binding/napi-v3 --napi_version=7 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/var/www/production/source/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Linux 5.8.0-25-generic
node-pre-gyp ERR! command "/usr/bin/node" "/var/www/production/source/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /var/www/production/source/node_modules/bcrypt
node-pre-gyp ERR! node -v v14.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.15.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/var/www/production/source/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/var/www/production/source/node_modules/bcrypt/lib/binding/napi-v3 --napi_version=7 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm WARN acorn-jsx#5.2.0 requires a peer of acorn#^6.0.0 || ^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-import#2.20.2 requires a peer of eslint#2.x - 6.x but none is installed. You must install peer dependencies yourself.
npm WARN notification-server#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt#5.0.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#5.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-11-13T11_08_58_941Z-debug.log
I read online that Im required to add the routing to the npm registry in the /etc/hosts
like so
2606:4700::6810:1723 registry.npmjs.org
but still doesn't work for bcrypt.

How to install npm openlpr in nodejs

I have been trying to install the npm node-openalpr package but i am facing this error.How can i overcome this probblem?
> node-openalpr#1.1.1 install D:\My Codes\Thesis\node\node_modules\node-openalpr
> node-pre-gyp install --build-from-source --fallback-to-build
node-pre-gyp WARN Using needle 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 (D:\My Codes\Thesis\node\node_modules\node-pre-gyp\lib\util\versioning.js:220:15)
node-pre-gyp ERR! stack at Object.module.exports.evaluate (D:\My Codes\Thesis\node\node_modules\node-pre-gyp\lib\util\versioning.js:279:5)
node-pre-gyp ERR! stack at handle_gyp_opts (D:\My Codes\Thesis\node\node_modules\node-pre-gyp\lib\util\handle_gyp_opts.js:60:27)
node-pre-gyp ERR! stack at configure (D:\My Codes\Thesis\node\node_modules\node-pre-gyp\lib\configure.js:12:5)
node-pre-gyp ERR! stack at D:\My Codes\Thesis\node\node_modules\node-pre-gyp\lib\build.js:43:13
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (D:\My Codes\Thesis\node\node_modules\node-pre-gyp\lib\util\compile.js:85:9)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:311:20)
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:286:5)
node-pre-gyp ERR! System Windows_NT 10.0.19041
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\My Codes\\Thesis\\node\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--build-from-source" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\My Codes\Thesis\node\node_modules\node-openalpr
node-pre-gyp ERR! node -v v12.16.1
node-pre-gyp ERR! node-pre-gyp -v v0.15.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 WARN final_thesis#1.0.0 No description
npm WARN final_thesis#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
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\MSI\AppData\Roaming\npm-cache\_logs\2020-07-06T19_34_07_841Z-debug.log
I heard there is an issue regarding node-pre-gyp versions as this openalpr package is 5 years older.
how do I overcome this problem?
I noticed in the node-openaplr package.json the dependency for node-pre-gyp points to the node-pre-gyp repository, which means it will pull in the latest version of node-pre-gyp, which is way ahead of the last commit made in the node-openaplr repository.
Fork the node-openaplr repository and specified a commit hash on the node-pre-gyp dependency in the package.json, and then installed node-openaplr to project using
yarn add https://github.com/bameyrick/node-openalpr

npm WARN deprecated boom#2.10.1: This version is no longer maintained. Please upgrade to the latest version

I am running npm install -g node-inspector command and getting this error, I don`t know what to upgrade and how to ?
Full error I am getting is :
C:\xampp\htdocs\node\debug>npm install -g node-inspector
npm WARN deprecated boom#2.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated hoek#2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cryptiles#2.0.5: This version is no longer maintained. Please upgrade to the latest version.
> v8-profiler#5.7.0 preinstall C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-profiler
> node -e 'process.exit(0)'
> v8-debug#1.0.1 preinstall C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
> node -e 'process.exit(0)'
C:\Users\ashwanipanwar\AppData\Roaming\npm\node-inspector -> C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\bin\inspector.js
C:\Users\ashwanipanwar\AppData\Roaming\npm\node-debug -> C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\bin\node-debug.js
> v8-debug#1.0.1 install C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/debug/v1.0.1/node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-debug#1.0.1 and node#10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://node-inspector.s3.amazonaws.com/debug/v1.0.1/node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-debug#1.0.1 and node#10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 10.0.17134
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\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v64-win32-x64\\debug.node" "--module_name=debug" "--module_path=C:\\Users\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v64-win32-x64"
gyp ERR! cwd C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! 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\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v64-win32-x64\debug.node --module_name=debug --module_path=C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v64-win32-x64' (1)
node-pre-gyp ERR!stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
stack at FSReqWrap.oncomplete (fs.js:154:21)
node-pre-gyp gyp ERR! System Windows_NT 10.0.17134
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\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v64-win32-x64\\debug.node" "--module_name=debug" "--module_path=C:\\Users\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v64-win32-x64"
gyp ERR! cwd C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
gyp ERR! node -v v10.15.0
ERR! stack at maybeClose (internal/child_process.js:962:16)
node-pre-gyp gypERR! ERR!stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-gyp -v v3.8.0
node-pre-gypgyp ERR!ERR! System Windows_NT 10.0.17134
not oknode-pre-gyp
ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
node-pre-gyp ERR! node -v v10.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
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\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v64-win32-x64\debug.node --module_name=debug --module_path=C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v64-win32-x64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! v8-debug#1.0.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-debug#1.0.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\ashwanipanwar\AppData\Roaming\npm-cache\_logs\2019-02-18T06_14_35_105Z-debug.log
You can do npm update <package name> to update specific pacakage. To update it globally you can use -g. To update all the outdated packages you can use just npm update
To update to specific version use '#packageversionname' after package as like npm update express#1.0.2
If you are still getting error try uninstalling it first and installing it to specific version

Categories

Resources