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

Error about node-gyp or node-pre-gyp when install #167

Open
scillidan opened this issue Sep 5, 2022 · 10 comments
Open

Error about node-gyp or node-pre-gyp when install #167

scillidan opened this issue Sep 5, 2022 · 10 comments

Comments

@scillidan
Copy link

scillidan commented Sep 5, 2022

Windows10,
npm 8.5.1,
nodejs 17.6.0

I try npm install webtorrent-hybrid -g, and it say:

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 C:\Users\scillidan\scoop\persist\nodejs\bin\node_modules\webtorrent-hybrid\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' �����ڲ����ⲿ���Ҳ���ǿ����еij���
npm ERR! ���������ļ���

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\scillidan\scoop\persist\nodejs\cache\_logs\2022-09-05T16_31_57_775Z-debug-0.log

I check some issues and try install node-pre-gyp, node-gyp first. But it seem don't work:

λ npm install webtorrent-hybrid -g

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 C:\Users\scillidan\scoop\persist\nodejs\bin\node_modules\webtorrent-hybrid\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! 404 status code downloading tarball https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Debug/win32-x64.tar.gz
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.17.0
npm ERR! node-pre-gyp info using node@17.6.0 | win32 | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "C:\Users\scillidan\scoop\persist\nodejs\bin\node_modules\webtorrent-hybrid\node_modules\wrtc\build\Debug\wrtc.node" (not found)
npm ERR! node-pre-gyp http GET https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Debug/win32-x64.tar.gz
npm ERR! node-pre-gyp http 404 https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Debug/win32-x64.tar.gz
npm ERR! node-pre-gyp ERR! install error
npm ERR! node-pre-gyp ERR! stack Error: 404 status code downloading tarball https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Debug/win32-x64.tar.gz
npm ERR! node-pre-gyp ERR! stack     at PassThrough.<anonymous> (C:\Users\scillidan\scoop\persist\nodejs\bin\node_modules\node-pre-gyp\lib\install.js:142:27)
npm ERR! node-pre-gyp ERR! stack     at PassThrough.emit (node:events:539:35)
npm ERR! node-pre-gyp ERR! stack     at ClientRequest.<anonymous> (C:\Users\scillidan\scoop\persist\nodejs\bin\node_modules\node-pre-gyp\node_modules\needle\lib\needle.js:538:9)     
npm ERR! node-pre-gyp ERR! stack     at Object.onceWrapper (node:events:642:26)
npm ERR! node-pre-gyp ERR! stack     at ClientRequest.emit (node:events:527:28)
npm ERR! node-pre-gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:618:27)
npm ERR! node-pre-gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
npm ERR! node-pre-gyp ERR! stack     at TLSSocket.socketOnData (node:_http_client:482:22)  
npm ERR! node-pre-gyp ERR! stack     at TLSSocket.emit (node:events:527:28)
npm ERR! node-pre-gyp ERR! stack     at addChunk (node:internal/streams/readable:324:12)   
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19044
npm ERR! node-pre-gyp ERR! command "C:\\Users\\scillidan\\scoop\\apps\\nodejs\\current\\node.exe" "C:\\Users\\scillidan\\scoop\\apps\\nodejs\\current\\bin\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--debug"
npm ERR! node-pre-gyp ERR! cwd C:\Users\scillidan\scoop\persist\nodejs\bin\node_modules\webtorrent-hybrid\node_modules\wrtc
npm ERR! node-pre-gyp ERR! node -v v17.6.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.17.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\scillidan\scoop\persist\nodejs\cache\_logs\2022-09-05T16_38_25_826Z-debug-0.log

The log is too long so here is a part:

..
1465 timing auditReport:getReport Completed in 1680ms
1466 silly audit report {
1466 silly audit report   xmldom: [
1466 silly audit report     {
1466 silly audit report       id: 1082377,
1466 silly audit report       url: 'https://github.com/advisories/GHSA-h6q6-9hqw-rwfv',
1466 silly audit report       title: 'Misinterpretation of malicious XML input',
1466 silly audit report       severity: 'low',
1466 silly audit report       vulnerable_versions: '<0.5.0',
1466 silly audit report       cwe: [Array],
1466 silly audit report       cvss: [Object]
1466 silly audit report     },
1466 silly audit report     {
1466 silly audit report       id: 1067480,
1466 silly audit report       url: 'https://github.com/advisories/GHSA-5fg8-2547-mr8q',
1466 silly audit report       title: 'Misinterpretation of malicious XML input',
1466 silly audit report       severity: 'moderate',
1466 silly audit report       vulnerable_versions: '<0.7.0',
1466 silly audit report       cwe: [Array],
1466 silly audit report       cvss: [Object]
1466 silly audit report     }
1466 silly audit report   ]
1466 silly audit report }
1467 timing metavuln:packument:xmldom Completed in 0ms
1468 timing metavuln:cache:get:security-advisory:xmldom:ujUrXa1B0oSIkeBAqBIIxletsXHqAWswoc/e+flOOPqm/KAnxBbYNhvVC4j1m+qOd9sahOsks6N03rEUdRqBeg== Completed in 1ms
1469 timing metavuln:load:security-advisory:xmldom:1067480 Completed in 0ms
1470 timing metavuln:calculate:security-advisory:xmldom:1067480 Completed in 1ms
1471 timing metavuln:cache:get:security-advisory:xmldom:RcByQplMDvoVV0qNhgWHzd/g+vdOJRoIiT3JCqCzfDdY0tPEaebbRW+gKiBewTE8TSkjFHoqmUp6YHlX6l08jA== Completed in 1ms
1472 timing metavuln:load:security-advisory:xmldom:1082377 Completed in 0ms
1473 timing metavuln:calculate:security-advisory:xmldom:1082377 Completed in 3ms
1474 timing metavuln:packument:plist-with-patches Completed in 0ms
1475 timing metavuln:cache:get:security-advisory:plist-with-patches:9xWJvZsDxEFGZZW3M5fiSRPLbbdAQYWRTA2law8qTc4eO3k6/U2hNNJBwQvQAsWSjV+qYfYth5LNcSz1U5anlQ== Completed in 1ms
1476 timing metavuln:load:security-advisory:plist-with-patches:RcByQplMDvoVV0qNhgWHzd/g+vdOJRoIiT3JCqCzfDdY0tPEaebbRW+gKiBewTE8TSkjFHoqmUp6YHlX6l08jA== Completed in 0ms
1477 timing metavuln:calculate:security-advisory:plist-with-patches:RcByQplMDvoVV0qNhgWHzd/g+vdOJRoIiT3JCqCzfDdY0tPEaebbRW+gKiBewTE8TSkjFHoqmUp6YHlX6l08jA== Completed in 1ms
1478 timing metavuln:packument:airplay-js Completed in 0ms
1479 timing metavuln:cache:get:security-advisory:airplay-js:P2jDvukq8PFJmzTwf3YnzNwixCO6DHtsHGvdNp7O8x50Att4E6MErgogBuFmIKiGg1aMwN9eIjpO09vFWmMJxA== Completed in 1ms
1480 timing metavuln:load:security-advisory:airplay-js:9xWJvZsDxEFGZZW3M5fiSRPLbbdAQYWRTA2law8qTc4eO3k6/U2hNNJBwQvQAsWSjV+qYfYth5LNcSz1U5anlQ== Completed in 0ms
1481 timing metavuln:calculate:security-advisory:airplay-js:9xWJvZsDxEFGZZW3M5fiSRPLbbdAQYWRTA2law8qTc4eO3k6/U2hNNJBwQvQAsWSjV+qYfYth5LNcSz1U5anlQ== Completed in 1ms
1482 timing metavuln:packument:webtorrent-cli Completed in 0ms
1483 timing metavuln:cache:get:security-advisory:webtorrent-cli:1t7vedoEECW4IxtwrK70HKhc/XW2IUUwtwoH3og1YZAjdk54wiFsKUCsSgfILdmYdgQdb8ttks/F9E5Cem00Zw== Completed in 0ms
1484 timing metavuln:load:security-advisory:webtorrent-cli:P2jDvukq8PFJmzTwf3YnzNwixCO6DHtsHGvdNp7O8x50Att4E6MErgogBuFmIKiGg1aMwN9eIjpO09vFWmMJxA== Completed in 1ms
1485 timing metavuln:calculate:security-advisory:webtorrent-cli:P2jDvukq8PFJmzTwf3YnzNwixCO6DHtsHGvdNp7O8x50Att4E6MErgogBuFmIKiGg1aMwN9eIjpO09vFWmMJxA== Completed in 1ms
1486 timing auditReport:init Completed in 9ms
1487 timing reify:audit Completed in 1689ms
1488 timing reifyNode:node_modules/webtorrent-hybrid/node_modules/rxjs Completed in 1742ms
1489 timing reify:unpack Completed in 1745ms
1490 timing reify:unretire Completed in 0ms
1491 timing build:queue Completed in 4ms
1492 timing build:link:node_modules/webtorrent-hybrid/node_modules/create-torrent Completed in 16ms
1493 timing build:link:node_modules/webtorrent-hybrid/node_modules/ecstatic/node_modules/mime Completed in 15ms
1494 timing build:link:node_modules/webtorrent-hybrid/node_modules/chromecasts/node_modules/mime Completed in 15ms
1495 timing build:link:node_modules/webtorrent-hybrid/node_modules/dlnacasts/node_modules/mime Completed in 15ms
1496 timing build:link:node_modules/webtorrent-hybrid/node_modules/bittorrent-tracker Completed in 16ms
1497 timing build:link:node_modules/webtorrent-hybrid/node_modules/he Completed in 16ms
1498 timing build:link:node_modules/webtorrent-hybrid/node_modules/multicast-dns Completed in 15ms
1499 timing build:link:node_modules/webtorrent-hybrid/node_modules/mime Completed in 16ms
1500 timing build:link:node_modules/webtorrent-hybrid/node_modules/ecstatic Completed in 16ms
1501 timing build:link:node_modules/webtorrent-hybrid/node_modules/is-docker Completed in 16ms
1502 timing build:link:node_modules/webtorrent-hybrid/node_modules/network-address Completed in 15ms
1503 timing build:link:node_modules/webtorrent-hybrid/node_modules/utp-native Completed in 15ms
1504 timing build:link:node_modules/webtorrent-hybrid/node_modules/semver Completed in 15ms
1505 timing build:link:node_modules/webtorrent-hybrid/node_modules/rimraf Completed in 15ms
1506 timing build:link:node_modules/webtorrent-hybrid/node_modules/parse-torrent Completed in 15ms
1507 timing build:link:node_modules/webtorrent-hybrid/node_modules/vlc-command Completed in 15ms
1508 timing build:link:node_modules/webtorrent-hybrid/node_modules/webtorrent-cli Completed in 15ms
1509 timing build:link:node_modules/webtorrent-hybrid/node_modules/node-gyp-build Completed in 15ms
1510 timing build:link:node_modules/webtorrent-hybrid/node_modules/protobufjs Completed in 15ms
1511 timing build:link:node_modules/webtorrent-hybrid Completed in 17ms
1512 timing build:link Completed in 17ms
1513 info run bufferutil@4.0.6 install node_modules/webtorrent-hybrid/node_modules/bufferutil node-gyp-build
1514 info run utf-8-validate@5.0.9 install node_modules/webtorrent-hybrid/node_modules/utf-8-validate node-gyp-build
1515 info run utp-native@2.5.3 install node_modules/webtorrent-hybrid/node_modules/utp-native node-gyp-build
1516 info run wrtc@0.4.7 install node_modules/webtorrent-hybrid/node_modules/wrtc node scripts/download-prebuilt.js
1517 info run bufferutil@4.0.6 install { code: 0, signal: null }
1518 timing build:run:install:node_modules/webtorrent-hybrid/node_modules/bufferutil Completed in 133ms
1519 info run utp-native@2.5.3 install { code: 0, signal: null }
1520 timing build:run:install:node_modules/webtorrent-hybrid/node_modules/utp-native Completed in 129ms
1521 info run utf-8-validate@5.0.9 install { code: 0, signal: null }
1522 timing build:run:install:node_modules/webtorrent-hybrid/node_modules/utf-8-validate Completed in 136ms
1523 info run wrtc@0.4.7 install { code: 1, signal: null }
1524 timing reify:rollback:createSparse Completed in 607ms
1525 timing reify:rollback:retireShallow Completed in 0ms
1526 timing command:install Completed in 4620ms
1527 verbose stack Error: command failed
1527 verbose stack     at ChildProcess.<anonymous> (C:\Users\scillidan\scoop\apps\nodejs\17.6.0\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
1527 verbose stack     at ChildProcess.emit (node:events:527:28)
1527 verbose stack     at maybeClose (node:internal/child_process:1090:16)
1527 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
1528 verbose pkgid wrtc@0.4.7
1529 verbose cwd D:\ketarin
1530 verbose Windows_NT 10.0.19044
1531 verbose argv "C:\\Users\\scillidan\\scoop\\apps\\nodejs\\current\\node.exe" "C:\\Users\\scillidan\\scoop\\apps\\nodejs\\current\\node_modules\\npm\\bin\\npm-cli.js" "install" "webtorrent-hybrid" "-g"
1532 verbose node v17.6.0
1533 verbose npm  v8.5.1
1534 error code 1
1535 error path C:\Users\scillidan\scoop\persist\nodejs\bin\node_modules\webtorrent-hybrid\node_modules\wrtc
1536 error command failed
1537 error command C:\Windows\system32\cmd.exe /d /s /c node scripts/download-prebuilt.js
1538 error 404 status code downloading tarball https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Debug/win32-x64.tar.gz
1539 error node-pre-gyp info it worked if it ends with ok
1539 error node-pre-gyp info using node-pre-gyp@0.17.0
1539 error node-pre-gyp info using node@17.6.0 | win32 | x64
1539 error node-pre-gyp WARN Using needle for node-pre-gyp https download 
1539 error node-pre-gyp info check checked for "C:\Users\scillidan\scoop\persist\nodejs\bin\node_modules\webtorrent-hybrid\node_modules\wrtc\build\Debug\wrtc.node" (not found)
1539 error node-pre-gyp http GET https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Debug/win32-x64.tar.gz
1539 error node-pre-gyp http 404 https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Debug/win32-x64.tar.gz
1539 error node-pre-gyp ERR! install error 
1539 error node-pre-gyp ERR! stack Error: 404 status code downloading tarball https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Debug/win32-x64.tar.gz
1539 error node-pre-gyp ERR! stack     at PassThrough.<anonymous> (C:\Users\scillidan\scoop\persist\nodejs\bin\node_modules\node-pre-gyp\lib\install.js:142:27)
1539 error node-pre-gyp ERR! stack     at PassThrough.emit (node:events:539:35)
1539 error node-pre-gyp ERR! stack     at ClientRequest.<anonymous> (C:\Users\scillidan\scoop\persist\nodejs\bin\node_modules\node-pre-gyp\node_modules\needle\lib\needle.js:538:9)
1539 error node-pre-gyp ERR! stack     at Object.onceWrapper (node:events:642:26)
1539 error node-pre-gyp ERR! stack     at ClientRequest.emit (node:events:527:28)
1539 error node-pre-gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:618:27)
1539 error node-pre-gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
1539 error node-pre-gyp ERR! stack     at TLSSocket.socketOnData (node:_http_client:482:22)
1539 error node-pre-gyp ERR! stack     at TLSSocket.emit (node:events:527:28)
1539 error node-pre-gyp ERR! stack     at addChunk (node:internal/streams/readable:324:12)
1539 error node-pre-gyp ERR! System Windows_NT 10.0.19044
1539 error node-pre-gyp ERR! command "C:\\Users\\scillidan\\scoop\\apps\\nodejs\\current\\node.exe" "C:\\Users\\scillidan\\scoop\\apps\\nodejs\\current\\bin\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--debug"
1539 error node-pre-gyp ERR! cwd C:\Users\scillidan\scoop\persist\nodejs\bin\node_modules\webtorrent-hybrid\node_modules\wrtc
1539 error node-pre-gyp ERR! node -v v17.6.0
1539 error node-pre-gyp ERR! node-pre-gyp -v v0.17.0
1539 error node-pre-gyp ERR! not ok
1540 verbose exit 1
1541 timing npm Completed in 4847ms
1542 verbose unfinished npm timer reify 1662395906034
1543 verbose unfinished npm timer reify:build 1662395908647
1544 verbose unfinished npm timer build 1662395908648
1545 verbose unfinished npm timer build:deps 1662395908648
1546 verbose unfinished npm timer build:run:install 1662395908669
1547 verbose unfinished npm timer build:run:install:node_modules/webtorrent-hybrid/node_modules/wrtc 1662395908680
1548 verbose code 1
1549 error A complete log of this run can be found in:
1549 error     C:\Users\scillidan\scoop\persist\nodejs\cache\_logs\2022-09-05T16_38_25_826Z-debug-0.log

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.

@konsumer
Copy link

konsumer commented Sep 5, 2022

I also have this issue on node v17.6.0

npm i webtorrent-hybrid

npm WARN deprecated [email protected]: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated [email protected]: 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.

konsumer added a commit to konsumer/webtorrent-hybrid that referenced this issue Sep 6, 2022
@konsumer
Copy link

konsumer commented Sep 6, 2022

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.)

@luxi-record
Copy link

I got the same problem,have some ways to fix it?

@konsumer
Copy link

konsumer commented Nov 2, 2022

@lanjingyun I made a PR to fix it (see above) and also instructions on the PR for doing it without the webtorrent-hybrid wrapper.

@abdurrahim11
Copy link

npm i webtorrent-hybrid
npm WARN deprecated [email protected]: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated [email protected]: 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

@github-actions
Copy link

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

@konsumer
Copy link

konsumer commented Mar 7, 2023

Bummer. Is this project dead?

@alias-rahil
Copy link

!reopen

@cbrunnkvist
Copy link

Same issue on macOS. Installed the currently maintained(?), scoped, version of node-pre-gyp, crossed my fingers but still no banana:

1495 info run [email protected] install node_modules/webtorrent-hybrid/node_modules/bufferutil node-gyp-build
1496 info run [email protected] install node_modules/webtorrent-hybrid/node_modules/utf-8-validate node-gyp-build
1497 info run [email protected] install node_modules/webtorrent-hybrid/node_modules/utp-native node-gyp-build
1498 info run [email protected] install node_modules/webtorrent-hybrid/node_modules/wrtc node scripts/download-prebuilt.js
1499 info run [email protected] install { code: 0, signal: null }
1500 timing build:run:install:node_modules/webtorrent-hybrid/node_modules/utp-native Completed in 752ms
1501 info run [email protected] 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 [email protected] install { code: 0, signal: null }
1504 timing build:run:install:node_modules/webtorrent-hybrid/node_modules/bufferutil Completed in 1206ms
1505 info run [email protected] 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 [email protected]
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 [email protected]
1520 error node-pre-gyp info using [email protected] | 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

@konsumer
Copy link

@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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants