webtorrent / webtorrent-hybrid

WebTorrent (with WebRTC support in Node.js)
https://webtorrent.io
MIT License
519 stars 98 forks source link

installation fails #132

Closed gilad905 closed 3 years ago

gilad905 commented 3 years ago

What version of this package are you using? just running npm i webtorrent-hybrid

What operating system, Node.js, and npm version? Ubuntu 18.04.5 node v15.0.1 npm 7.17.0

What happened?

$ npm i webtorrent-hybrid npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0 npm ERR! code 1 npm ERR! path /node/test/node_modules/wrtc npm ERR! command failed npm ERR! command sh -c node scripts/download-prebuilt.js npm ERR! Failed to execute '/usr/bin/node /home/node/.nvm/versions/node/v15.0.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --module=/node/test/node_modules/wrtc/build/Release/wrtc.node --module_name=wrtc --module_path=/node/test/node_modules/wrtc/build/Release' (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using node-pre-gyp@0.6.32 npm ERR! node-pre-gyp info using node@8.10.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@7.1.2 npm ERR! gyp info using node@8.10.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@7.1.2 npm ERR! gyp info using node@8.10.0 | linux | x64 npm ERR! gyp info find Python using Python version 3.6.9 found at "/usr/bin/python3" npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ '/home/node/.nvm/versions/node/v15.0.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/node/test/node_modules/wrtc/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/node/.nvm/versions/node/v15.0.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/node/.cache/node-gyp/8.10.0/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/home/node/.cache/node-gyp/8.10.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/node/.nvm/versions/node/v15.0.1/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/home/node/.cache/node-gyp/8.10.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/node/test/node_modules/wrtc', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' ] npm ERR! gyp: binding.gyp not found (cwd: /node/test/node_modules/wrtc) while trying to load binding.gyp npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/home/node/.nvm/versions/node/v15.0.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) npm ERR! gyp ERR! stack at emitTwo (events.js:126:13) npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:214:7) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) npm ERR! gyp ERR! System Linux 4.15.0-144-generic npm ERR! gyp ERR! command "/usr/bin/node" "/home/node/.nvm/versions/node/v15.0.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--module=/node/test/node_modules/wrtc/build/Release/wrtc.node" "--module_name=wrtc" "--module_path=/node/test/node_modules/wrtc/build/Release" npm ERR! gyp ERR! cwd /node/test/node_modules/wrtc npm ERR! gyp ERR! node -v v8.10.0 npm ERR! gyp ERR! node-gyp -v v7.1.2 npm ERR! gyp ERR! not ok npm ERR! node-pre-gyp ERR! build error npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /home/node/.nvm/versions/node/v15.0.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --module=/node/test/node_modules/wrtc/build/Release/wrtc.node --module_name=wrtc --module_path=/node/test/node_modules/wrtc/build/Release' (1) npm ERR! node-pre-gyp ERR! stack at ChildProcess. (/usr/lib/nodejs/node-pre-gyp/lib/util/compile.js:83:29) npm ERR! node-pre-gyp ERR! stack at emitTwo (events.js:126:13) npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7) npm ERR! node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16) npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) npm ERR! node-pre-gyp ERR! System Linux 4.15.0-144-generic npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/usr/bin/node-pre-gyp" "install" npm ERR! node-pre-gyp ERR! cwd /node/test/node_modules/wrtc npm ERR! node-pre-gyp ERR! node -v v8.10.0 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.6.32 npm ERR! node-pre-gyp ERR! not ok

alxhotel commented 3 years ago

It seems you are using node 8.10.0:

npm ERR! node-pre-gyp ERR! node -v v8.10.0

Try reinstalling node again with npm.