Open scillidan opened 1 year ago
I also have this issue on node v17.6.0
npm i webtorrent-hybrid
npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated ecstatic@4.1.4: This package is unmaintained and deprecated. See the GH Issue 259.
npm ERR! code 1
npm ERR! path /Users/konsumer/Desktop/otherdev/webshare/node_modules/wrtc
npm ERR! command failed
npm ERR! command sh -c node scripts/download-prebuilt.js
npm ERR! /bin/sh: node-pre-gyp: command not found
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/konsumer/.npm/_logs/2022-09-06T00_47_54_464Z-debug-0.log
Seems like the issue is with wrtc. If I remove that from package.json it installs, and if I try to install it, I get same error:
npm install wrtc
npm ERR! code 1
npm ERR! path /Users/konsumer/Desktop/webtorrent-hybrid/node_modules/wrtc
npm ERR! command failed
npm ERR! command sh -c node scripts/download-prebuilt.js
npm ERR! /bin/sh: node-pre-gyp: command not found
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/konsumer/.npm/_logs/2022-09-06T00_51_43_917Z-debug-0.log
It's hard to tell, but it looks liek the only place it is used is in global.js:
globalThis.WRTC = wrtc
I will try to make a PR to fix it.
seed example seems to work with above PR,including being able to hit a remote demo-hash on https://instant.io/ (which was not working with regular webtorrent lib, in node.)
I got the same problem,have some ways to fix it?
@lanjingyun I made a PR to fix it (see above) and also instructions on the PR for doing it without the webtorrent-hybrid wrapper.
npm i webtorrent-hybrid npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0 npm WARN deprecated ecstatic@4.1.4: This package is unmaintained and deprecated. See the GH Issue 259. npm ERR! code 1 npm ERR! path F:\xampp\htdocs\3\node_modules\wrtc npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/download-prebuilt.js npm ERR! 'node-pre-gyp' is not recognized as an internal or external command, npm ERR! operable program or batch file.
When I want to install I am facing this problem how can I install it by solving it
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
Bummer. Is this project dead?
!reopen
Same issue on macOS. Installed the currently maintained(?), scoped, version of node-pre-gyp, crossed my fingers but still no banana:
1495 info run bufferutil@4.0.8 install node_modules/webtorrent-hybrid/node_modules/bufferutil node-gyp-build
1496 info run utf-8-validate@5.0.10 install node_modules/webtorrent-hybrid/node_modules/utf-8-validate node-gyp-build
1497 info run utp-native@2.5.3 install node_modules/webtorrent-hybrid/node_modules/utp-native node-gyp-build
1498 info run wrtc@0.4.7 install node_modules/webtorrent-hybrid/node_modules/wrtc node scripts/download-prebuilt.js
1499 info run utp-native@2.5.3 install { code: 0, signal: null }
1500 timing build:run:install:node_modules/webtorrent-hybrid/node_modules/utp-native Completed in 752ms
1501 info run utf-8-validate@5.0.10 install { code: 0, signal: null }
1502 timing build:run:install:node_modules/webtorrent-hybrid/node_modules/utf-8-validate Completed in 969ms
1503 info run bufferutil@4.0.8 install { code: 0, signal: null }
1504 timing build:run:install:node_modules/webtorrent-hybrid/node_modules/bufferutil Completed in 1206ms
1505 info run wrtc@0.4.7 install { code: 1, signal: null }
1506 timing reify:rollback:createSparse Completed in 468ms
1507 timing reify:rollback:retireShallow Completed in 0ms
1508 timing command:install Completed in 3966ms
1509 verbose stack Error: command failed
1509 verbose stack at ChildProcess.<anonymous> (/Users/conny/.nvm/versions/node/v18.18.2/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
1509 verbose stack at ChildProcess.emit (node:events:517:28)
1509 verbose stack at maybeClose (node:internal/child_process:1098:16)
1509 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:303:5)
1510 verbose pkgid wrtc@0.4.7
1511 verbose cwd /Users/conny/Developer/vlc/peerfix-client/DL
1512 verbose Darwin 23.4.0
1513 verbose node v18.18.2
1514 verbose npm v9.8.1
1515 error code 1
1516 error path /Users/conny/.nvm/versions/node/v18.18.2/lib/node_modules/webtorrent-hybrid/node_modules/wrtc
1517 error command failed
1518 error command sh -c node scripts/download-prebuilt.js
1519 error response status 404 Not Found on https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Release/darwin-arm64.tar.gz
1520 error node-pre-gyp info it worked if it ends with ok
1520 error node-pre-gyp info using node-pre-gyp@1.0.11
1520 error node-pre-gyp info using node@18.18.2 | darwin | arm64
1520 error node-pre-gyp info check checked for "/Users/conny/.nvm/versions/node/v18.18.2/lib/node_modules/webtorrent-hybrid/node_modules/wrtc/build/Release/wrtc.node" (not found)
1520 error node-pre-gyp http GET https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Release/darwin-arm64.tar.gz
1520 error node-pre-gyp ERR! install response status 404 Not Found on https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Release/darwin-arm64.tar.gz
1520 error node-pre-gyp ERR! install error
1520 error node-pre-gyp ERR! stack Error: response status 404 Not Found on https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Release/darwin-arm64.tar.gz
1520 error node-pre-gyp ERR! stack at /Users/conny/.nvm/versions/node/v18.18.2/lib/node_modules/@mapbox/node-pre-gyp/lib/install.js:67:15
1520 error node-pre-gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
1520 error node-pre-gyp ERR! System Darwin 23.4.0
1520 error node-pre-gyp ERR! command "/Users/conny/.nvm/versions/node/v18.18.2/bin/node" "/Users/conny/.nvm/versions/node/v18.18.2/bin/node-pre-gyp" "install"
1520 error node-pre-gyp ERR! cwd /Users/conny/.nvm/versions/node/v18.18.2/lib/node_modules/webtorrent-hybrid/node_modules/wrtc
1520 error node-pre-gyp ERR! node -v v18.18.2
1520 error node-pre-gyp ERR! node-pre-gyp -v v1.0.11
1520 error node-pre-gyp ERR! not ok
1521 verbose exit 1
1522 timing npm Completed in 4057ms
1523 verbose unfinished npm timer reify 1714195577126
1524 verbose unfinished npm timer reify:build 1714195578699
1525 verbose unfinished npm timer build 1714195578699
1526 verbose unfinished npm timer build:deps 1714195578699
1527 verbose unfinished npm timer build:run:install 1714195578705
1528 verbose unfinished npm timer build:run:install:node_modules/webtorrent-hybrid/node_modules/wrtc 1714195578712
1529 verbose code 1
1530 error A complete log of this run can be found in: /Users/conny/.npm/_logs/2024-04-27T05_26_17_035Z-debug-0.log
@cbrunnkvist yeh, seems like this project is dead. No real response on my PR that fixes problem. You can do same stuff without this wrapper, by just using a more modern WebRTC polyfill & setting a default announce-list:
import WebTorrent from 'webtorrent'
import { announceList } from 'create-torrent'
import wrtc from '@koush/wrtc'
// this was in global, but is it needed?
globalThis.WEBTORRENT_ANNOUNCE = announceList
.map(arr => arr[0])
.filter(url => url.indexOf('wss://') === 0 || url.indexOf('ws://') === 0)
globalThis.WRTC = wrtc
// now do regular webtorrent stuff...
Windows10, npm 8.5.1, nodejs 17.6.0
I try
npm install webtorrent-hybrid -g
, and it say:I check some issues and try install
node-pre-gyp
,node-gyp
first. But it seem don't work:The log is too long so here is a part:
I remember I have been successfully installed before, may be I now use the version is too high. Not important and urgent for me, but thanks for read.