Git Product home page Git Product logo

Comments (10)

konsumer avatar konsumer commented on June 26, 2024 2

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.

from webtorrent-hybrid.

konsumer avatar konsumer commented on June 26, 2024 1

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

from webtorrent-hybrid.

konsumer avatar konsumer commented on June 26, 2024

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

from webtorrent-hybrid.

luxi-record avatar luxi-record commented on June 26, 2024

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

from webtorrent-hybrid.

abdurrahim11 avatar abdurrahim11 commented on June 26, 2024

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

from webtorrent-hybrid.

github-actions avatar github-actions commented on June 26, 2024

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

from webtorrent-hybrid.

konsumer avatar konsumer commented on June 26, 2024

Bummer. Is this project dead?

from webtorrent-hybrid.

alias-rahil avatar alias-rahil commented on June 26, 2024

!reopen

from webtorrent-hybrid.

cbrunnkvist avatar cbrunnkvist commented on June 26, 2024

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

from webtorrent-hybrid.

konsumer avatar konsumer commented on June 26, 2024

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

from webtorrent-hybrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.