Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'npm i ipfs' gives me an error with node-gyp #2353

Closed
YourNewEmpire opened this issue Mar 26, 2021 · 7 comments
Closed

'npm i ipfs' gives me an error with node-gyp #2353

YourNewEmpire opened this issue Mar 26, 2021 · 7 comments
Labels

Comments

@YourNewEmpire
Copy link

  • Node Version: 14.15.1 and npm@6.14.9
  • Platform: systeminfo | /C:"Win10Pro" /C:"10.0.19042" /C:"x64-based PC" (Windows)
  • Compiler: msbuild16
  • Module: ipfs
Verbose output (from npm or node-gyp):
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)

> gc-stats@1.4.0 install C:\Users\Archie\Documents\SSR apps\sharptec-frontend\node_modules\gc-stats
> 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://node-binaries.s3.amazonaws.com/gcstats/v1.4.0/Release/node-v83-win32-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for gc-stats@1.4.0 and node@14.15.1 (node-v83 ABI, unknown) (falling back to source compile with node-gyp) 
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe ENOENT
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
gyp ERR! stack     at onErrorNT (internal/child_process.js:465:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Archie\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\Archie\\Documents\\SSR 
apps\\sharptec-frontend\\node_modules\\gc-stats\\build\\gcstats\\v1.4.0\\Release\\node-v83-win32-x64\\gcstats.node" "--module_name=gcstats" "--module_path=C:\\Users\\Archie\\Documents\\SSR apps\\sharptec-frontend\\node_modules\\gc-stats\\build\\gcstats\\v1.4.0\\Release\\node-v83-win32-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd C:\Users\Archie\Documents\SSR apps\sharptec-frontend\node_modules\gc-stats
gyp ERR! node -v v14.15.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Archie\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\Archie\Documents\SSR apps\sharptec-frontend\node_modules\gc-stats\build\gcstats\v1.4.0\Release\node-v83-win32-x64\gcstats.node --module_name=gcstats --module_path=C:\Users\Archie\Documents\SSR apps\sharptec-frontend\node_modules\gc-stats\build\gcstats\v1.4.0\Release\node-v83-win32-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (7)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\Archie\Documents\SSR apps\sharptec-frontend\node_modules\gc-stats\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.19042
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Archie\\Documents\\SSR apps\\sharptec-frontend\\node_modules\\gc-stats\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"       
node-pre-gyp ERR! cwd C:\Users\Archie\Documents\SSR apps\sharptec-frontend\node_modules\gc-stats
node-pre-gyp ERR! node -v v14.15.1
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:\Users\Archie\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\Archie\Documents\SSR apps\sharptec-frontend\node_modules\gc-stats\build\gcstats\v1.4.0\Release\node-v83-win32-x64\gcstats.node --module_name=gcstats --module_path=C:\Users\Archie\Documents\SSR apps\sharptec-frontend\node_modules\gc-stats\build\gcstats\v1.4.0\Release\node-v83-win32-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (7)

> bcrypto@5.4.0 install C:\Users\Archie\Documents\SSR apps\sharptec-frontend\node_modules\bcrypto
> node-gyp rebuild


C:\Users\Archie\Documents\SSR apps\sharptec-frontend\node_modules\bcrypto>if not defined npm_config_node_gyp (node "C:\Users\Archie\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Archie\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe ENOENT
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
gyp ERR! stack     at onErrorNT (internal/child_process.js:465:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Archie\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Archie\Documents\SSR apps\sharptec-frontend\node_modules\bcrypto
gyp ERR! node -v v14.15.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
npm WARN ipfs-daemon@0.5.4 requires a peer of electron-webrtc@^0.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN ipfs-daemon@0.5.4 requires a peer of wrtc@^0.4.6 but none is installed. You must install peer dependencies yourself.
npm WARN prometheus-gc-stats@0.6.3 requires a peer of prom-client@>= 10 <= 12 but none is installed. You must install peer dependencies yourself.
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":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: gc-stats@1.4.0 (node_modules\gc-stats):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: gc-stats@1.4.0 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! bcrypto@5.4.0 install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the bcrypto@5.4.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!     C:\Users\Archie\AppData\Roaming\npm-cache\_logs\2021-03-26T16_03_02_178Z-debug.log
@cclauss cclauss added the ERR! node-gyp -v < v10.x.x npm install -g npm label Mar 26, 2021
@cclauss
Copy link
Contributor

cclauss commented Mar 26, 2021

gyp ERR! node-gyp -v v5.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.13.0

Please upgrade:

@YourNewEmpire
Copy link
Author

node-pre-gyp ERR! node-pre-gyp -v v0.13.0
gyp ERR! node-gyp -v v5.1.0

The error message does not change after i close VScode, update node-gyp and node-pre-gyp as you say. Would I need to restart as well?

@YourNewEmpire
Copy link
Author

But when i enter node-gyp -v into my project or into global i get 7.1.2

@cclauss
Copy link
Contributor

cclauss commented Mar 26, 2021

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Mar 30, 2021

gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe ENOENT

I think this is saying you have no MSBuild.exe in that location. Can you double-check that MSBuild.exe exists in that location? Perhaps reinstall your install of Visual Studio?

gyp ERR! node-gyp -v v5.1.0

The copy of node-gyp bundled with npm is running. You can update that using the instructions @cclauss linked above. Although I mentioned in another comment that the instructions are slightly wrong for Windows... See: #2354 (comment)

@cclauss
Copy link
Contributor

cclauss commented Jun 2, 2021

Please follow new Windows instructions at https://github.com/nodejs/node-gyp/wiki/Updating-npm's-bundled-node-gyp

@cclauss cclauss added the Windows label Jun 2, 2021
@cclauss cclauss added the node-pre-gyp is unmaintained mapbox/node-pre-gyp#657 label Apr 11, 2024
@cclauss
Copy link
Contributor

cclauss commented Apr 11, 2024

Closing because node-pre-gyp is unmaintained.

@cclauss cclauss closed this as completed Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants