mas94uk / upnpTube

Cast from YouTube app to DLNA/UPNP renderers
GNU General Public License v3.0
26 stars 8 forks source link

[Feature] Windows version #7

Open briantho opened 1 year ago

briantho commented 1 year ago

I've been trying to get this running under windows 10, and have successfully installed npm and nodejs natively. I've successfully followed the commands up to "npm link". It fails saying that "Cannot destructure property 'name' of '.for' as it is undefined."

here is the output from cmd.

S:\My Applications\upnptube>npm install https://github.com/mas94uk/upnpTube
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

added 168 packages in 14s

10 packages are looking for funding
  run `npm fund` for details

S:\My Applications\upnptube>npm link
npm ERR! Cannot destructure property 'name' of '.for' as it is undefined.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Brian\AppData\Local\npm-cache\_logs\2023-03-04T02_42_56_419Z-debug-0.log

2023-03-04T02_42_56_419Z-debug-0.log

is it possible to make this run under windows? I'm attaching the npm debug log. Any advice to make this work? Thanks

mas94uk commented 1 year ago

Hello. I don't have a windows PC I can easily test this on -- I might be able to procure one, but in the mean time perhaps you can get it running by running the application directly. The 'link' step is just supposed to "install" it on your machine (on Linux it links it into the location where commands are located -- I'm not sure what the Windows equivalent is).

Anyway, in the directory where you have npm installed it, try running node index.js.

Let me know if that works. (It does for me, on Ubuntu.)

briantho commented 1 year ago

hmm, ok. well running "node index.js" does do something. it says "doing SSDP discovery" but nothing after that. i assume it's trying to look for dlna devices, but can't find any? I do have 2 amps that support DLNA on my network, and other DLNA apps detect them just fine. In the mean time, i'm going to try and bring up a ubuntu vm on my windows machine, and see how that goes

mas94uk commented 1 year ago

That's interesting. You are correct, it's trying and failing to find them. Let me know how you get on with an Ubuntu VM and I'll put this on the list of things to investigate -- though to be honest I get very little time to spend on it and a Windows problem isn't easy for me to work on and does not affect me so it's going to be low down the list :-)

zejjnt commented 1 year ago

I have compiled for Windows and it works although is prone to crashes. If you have more than one NIC/IP, it will get stuck at SSDP discovery.

Use cmd; Check that it has detected the correct IP with

node_modules/.bin/network_address.cmd

I just built with npm install npm audit fix --force npm link cd node_modules/.bin node ../../index.js

It crashes for a variety of reasons and is only found by YouTube in Chrome and BubbleUPnP, but it's a step in the right direction at least.