webtorrent-hybrid icon indicating copy to clipboard operation
webtorrent-hybrid copied to clipboard

`npm install webtorrent-hybrid -g` fails on Ubuntu 20LTS and Windows 10

Open zackees opened this issue 3 years ago • 8 comments

What version of this package are you using? Latest

What operating system, Node.js, and npm version? Ubuntu 20/Win10, npm is 8.3.0

What happened?

Windows gives this error as does Ubuntu.

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 C:\Users\niteris\AppData\Roaming\npm\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' is not recognized as an internal or external command,
npm ERR! operable program or batch file.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\niteris\AppData\Local\npm-cache\_logs\2022-02-11T05_24_27_060Z-debug-0.log

After this error I ran sudo apt install node-pre-gyp and after this I get the following error (in Ubuntu)

niteris@ubuntu:~$ sudo npm install webtorrent-hybrid -g 
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 /usr/lib/node_modules/webtorrent-hybrid/node_modules/wrtc
npm ERR! command failed
npm ERR! command sh -c node scripts/download-prebuilt.js
npm ERR! /usr/bin/env: ‘nodejs’: No such file or directory

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-02-11T05_19_47_236Z-debug-0.log

And I can confirm that I do indeed have nodejs installed on my system.

Neither Ubuntu nor Windows allows me to run webtorrent-hybrid -g

What did you expect to happen? The app to run without problem

Are you willing to submit a pull request to fix this bug? No

zackees avatar Feb 11 '22 05:02 zackees

Have you tried? npm i node-pre-gyp -g

On windows what error do you have?

drakonkat avatar Feb 18 '22 21:02 drakonkat

So the update is that your suggestion and another fixed it. So in total it was

npm -i node-pre-gyp
npm -i node-gyp
# This now works
npm install webtorrent-hybrid -g 

Can these libs be included in the npm requirements for this project? (Sorry I'm more of a python programmer I don't know what the exact terminology is).

zackees avatar Feb 20 '22 04:02 zackees

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

github-actions[bot] avatar Apr 21 '22 12:04 github-actions[bot]

nothing has been done and this is still relevant.

zackees avatar Apr 25 '22 16:04 zackees

This is not an issue with the library itself, but rather wrtc having no prebuilt binaries

DiegoRBaquero avatar Apr 25 '22 16:04 DiegoRBaquero

Then why does

npm -i node-pre-gyp
npm -i node-gyp

Fix it? Sorry I'm not that familiar with node. I could be mistaken, but it seems like there are some missing libraries that need to be specified for the build to succeed.

zackees avatar Apr 27 '22 19:04 zackees

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

github-actions[bot] avatar Jun 27 '22 12:06 github-actions[bot]

Just tried this install setup again and still hit the bug. It appears that node-pre-gyp and node-gyp need to be listed in the package lock file.

zackees avatar Jun 27 '22 17:06 zackees

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

github-actions[bot] avatar Aug 27 '22 12:08 github-actions[bot]