bitfocus / companion-module-vbaudio-voicemeeter

MIT License
1 stars 2 forks source link

Can't install #17

Open JJK1231 opened 4 months ago

JJK1231 commented 4 months ago

Describe the bug I get this error when I do 'npm I'

npm WARN tarball tarball data for voicemeeter-connector@git+https://github.com/thedist/voicemeeter-connector.git (null) seems to be corrupted. Trying again. npm WARN tarball tarball data for voicemeeter-connector@git+https://github.com/thedist/voicemeeter-connector.git (null) seems to be corrupted. Trying again. npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno -4058 npm ERR! enoent An unknown git error occurred npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

thedist commented 4 months ago

What version of npm and node are you using, as I can't reproduce this.

JJK1231 commented 4 months ago

I use Node version 20.11.0 and NPM version 10.5.0.

thedist commented 4 months ago

So the issue seems to be that because Companion currently developed on Node 18 (due to certain major components not yet supporting new versions) trying to install the dependencies of this module to run it on a remote machine as a proxy will fail on your version of node.

For the time being, you could either run Companion on the same machine as Voicemeeter, as you don't need to use the proxy if they're on the same machine, Companion can just connect directly. Or you could Node 18 on the remote machine that you want to run the proxy.

In the long term I could split off the proxy from this companion module, so that the proxy would be more flexible to work on any version of node, but that would be a substantial change so will take some time.

JJK1231 commented 4 months ago

I use the same computer for Companion and Voicemeeter. But if I enter 127.0.0.1 then Companion stays on 'Initializing'.

thedist commented 4 months ago

The proxy uses the exact same connection logic so if Companion can't connect then the proxy wouldn't be able to either.

Click the >_ button next to the Voicemeeter connection in Companions connection list and see if any errors or debug messages are showing an issue.

Osiris-Ra commented 2 months ago

Having same error and have rolled back to v18 with same error. running two machine setup with two instances of voicemeter and the instance that I wish to control is the other machine that than the companion machine,

thedist commented 2 months ago

Try using yarn to install the dependencies and see if that works.

Then check what do the connection logs show in Companion, and what does the proxy logs show that are running on the separate machine you're wishing to control?

Osiris-Ra commented 2 months ago

2698 verbose stack Error: An unknown git error occurred 2698 verbose stack at makeError (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\git\lib\make-error.js:28:13) 2698 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\git\lib\spawn.js:37:26 2698 verbose stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2699 verbose cwd C:\Temp\companion-module-vbaudio-voicemeeter-1.2.1 2700 verbose Windows_NT 10.0.19045 2701 verbose node v18.20.2 2702 verbose npm v10.5.0 2703 error code ENOENT 2704 error syscall spawn git 2705 error path git 2706 error errno -4058 2707 error enoent An unknown git error occurred 2708 error enoent This is related to npm not being able to find a file. 2708 error enoent 2709 verbose exit -4058 2710 timing npm Completed in 688477ms 2711 verbose unfinished npm timer reify 1713714399372 2712 verbose unfinished npm timer reify:loadTrees 1713714399512 2713 verbose code -4058 2714 error A complete log of this run can be found in: C:\Users\Scotch\AppData\Local\npm-cache_logs\2024-04-21T15_46_38_777Z-debug-0.log

Osiris-Ra commented 2 months ago

C:\Temp\companion-module-vbaudio-voicemeeter-1.2.1>yarn yarn install v1.22.22 [1/4] Resolving packages... [2/4] Fetching packages... warning Pattern ["strip-ansi@^6.0.1"] is trying to unpack in the same destination "C:\Users\Scotch\AppData\Local\Yarn\Cache\v6\npm-strip-ansi-cjs-6.0.1-9e26c63d30f53443e9489495b2105d37b67a85d9-integrity\node_modules\strip-ansi-cjs" as pattern ["strip-ansi-cjs@npm:strip-ansi@^6.0.1"]. This could result in non-deterministic behavior, skipping. warning Pattern ["string-width@^4.1.0"] is trying to unpack in the same destination "C:\Users\Scotch\AppData\Local\Yarn\Cache\v6\npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity\node_modules\string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping. warning Pattern ["strip-ansi@^6.0.0"] is trying to unpack in the same destination "C:\Users\Scotch\AppData\Local\Yarn\Cache\v6\npm-strip-ansi-cjs-6.0.1-9e26c63d30f53443e9489495b2105d37b67a85d9-integrity\node_modules\strip-ansi-cjs" as pattern ["strip-ansi-cjs@npm:strip-ansi@^6.0.1"]. This could result in non-deterministic behavior, skipping. warning Pattern ["string-width@^4.2.3"] is trying to unpack in the same destination "C:\Users\Scotch\AppData\Local\Yarn\Cache\v6\npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity\node_modules\string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping. warning Pattern ["string-width@^4.2.0"] is trying to unpack in the same destination "C:\Users\Scotch\AppData\Local\Yarn\Cache\v6\npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity\node_modules\string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping. warning Pattern ["wrap-ansi@^7.0.0"] is trying to unpack in the same destination "C:\Users\Scotch\AppData\Local\Yarn\Cache\v6\npm-wrap-ansi-cjs-7.0.0-67e145cff510a6a6984bdf1152911d69d2eb9e43-integrity\node_modules\wrap-ansi-cjs" as pattern ["wrap-ansi-cjs@npm:wrap-ansi@^7.0.0"]. This could result in non-deterministic behavior, skipping. error Couldn't find the binary git info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

C:\Temp\companion-module-vbaudio-voicemeeter-1.2.1>

Osiris-Ra commented 2 months ago

Not having much luck

Osiris-Ra commented 2 months ago

C:\Temp\companion-module-vbaudio-voicemeeter-1.2.1>node proxy node:internal/modules/cjs/loader:1143 throw err; ^

Error: Cannot find module 'socket.io' Require stack:

Node.js v18.20.2

C:\Temp\companion-module-vbaudio-voicemeeter-1.2.1>

thedist commented 2 months ago

error Couldn't find the binary git

Is an odd error. Is git properly installed and in path env variable?

Only other suggestion I can think of right now is to try node v18.18.1 as with that node version, yarn 1.22.19, I can't reproduce the issue you're experiencing.

Osiris-Ra commented 2 months ago

yeah it is odd, will have to find a copy of 18,18,1 as they not have it on the site.

thedist commented 2 months ago

I'd recommend trying Node Version Manager, it's a simple tool that from the command line lets you easily switch between different node versions without needing to find the installers or anything as it handles it.

Osiris-Ra commented 2 months ago

sigh, still having same error with npm and yarn using 18.18.1

I do like nvm tho that is very handy

Osiris-Ra commented 2 months ago

well got some progress after removing and installing GIT. Now saying I need python and VS. Really? I just want to use the proxy so I can use the plugin....

PS C:\Temp\companion-module-vbaudio-voicemeeter-1.2.1> npm i npm WARN skipping integrity check for git dependency ssh://git@github.com/thedist/voicemeeter-connector.git npm WARN deprecated rimraf@4.1.2: Please upgrade to 4.3.1 or higher to fix a potentially damaging issue regarding symbolic link following. See https://github.com/isaacs/rimraf/issues/259 for details. npm WARN cleanup Failed to remove some directories [ npm WARN cleanup [ npm WARN cleanup 'C:\Temp\companion-module-vbaudio-voicemeeter-1.2.1\node_modules\@sentry-internal', npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Temp\companion-module-vbaudio-voicemeeter-1.2.1\node_modules\@sentry-internal'] { npm WARN cleanup errno: -4048, npm WARN cleanup code: 'EPERM', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'C:\Temp\companion-module-vbaudio-voicemeeter-1.2.1\node_modules\@sentry-internal' npm WARN cleanup } npm WARN cleanup ] npm WARN cleanup ] npm ERR! code 1 npm ERR! git dep preparation failed npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\Scotch\AppData\Roaming\nvm\v18.18.1\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\Scotch\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run npm ERR! npm WARN using --force Recommended protections disabled. npm ERR! npm WARN ERESOLVE overriding peer dependency npm ERR! npm WARN While resolving: typedoc@0.22.12 npm ERR! npm WARN Found: typescript@4.6.2 npm ERR! npm WARN node_modules/typescript npm ERR! npm WARN dev typescript@"4.6.2" from the root project npm ERR! npm WARN 3 more (microbundle, rollup-plugin-typescript2, tsutils) npm ERR! npm WARN npm ERR! npm WARN Could not resolve dependency: npm ERR! npm WARN peer typescript@"4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x" from typedoc@0.22.12 npm ERR! npm WARN node_modules/typedoc npm ERR! npm WARN dev typedoc@"0.22.12" from the root project npm ERR! npm WARN npm ERR! npm WARN Conflicting peer dependency: typescript@4.5.5 npm ERR! npm WARN node_modules/typescript npm ERR! npm WARN peer typescript@"4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x" from typedoc@0.22.12 npm ERR! npm WARN node_modules/typedoc npm ERR! npm WARN dev typedoc@"0.22.12" from the root project npm ERR! npm ERR! code 1 npm ERR! npm ERR! path C:\Users\Scotch\AppData\Local\npm-cache_cacache\tmp\git-clonemYAICG\node_modules\ffi-napi npm ERR! npm ERR! command failed npm ERR! npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp-build npm ERR! npm ERR! gyp info it worked if it ends with ok npm ERR! npm ERR! gyp info using node-gyp@9.4.0 npm ERR! npm ERR! gyp info using node@18.18.1 | win32 | x64 npm ERR! npm ERR! gyp info find Python using Python version 3.10.9 found at "C:\Users\Scotch\AppData\Local\Programs\Python\Python310\python.exe" npm ERR! npm ERR! gyp http GET https://nodejs.org/download/release/v18.18.1/node-v18.18.1-headers.tar.gz npm ERR! npm ERR! gyp http 200 https://nodejs.org/download/release/v18.18.1/node-v18.18.1-headers.tar.gz npm ERR! npm ERR! gyp http GET https://nodejs.org/download/release/v18.18.1/SHASUMS256.txt npm ERR! npm ERR! gyp http GET https://nodejs.org/download/release/v18.18.1/win-x64/node.lib npm ERR! npm ERR! gyp http 200 https://nodejs.org/download/release/v18.18.1/SHASUMS256.txt npm ERR! npm ERR! gyp http 200 https://nodejs.org/download/release/v18.18.1/win-x64/node.lib npm ERR! npm ERR! gyp ERR! find VS npm ERR! npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config npm ERR! npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt npm ERR! npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details npm ERR! npm ERR! gyp ERR! find VS looking for Visual Studio 2015 npm ERR! npm ERR! gyp ERR! find VS - not found npm ERR! npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 npm ERR! npm ERR! gyp ERR! find VS npm ERR! npm ERR! gyp ERR! find VS ** npm ERR! npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio npm ERR! npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload. npm ERR! npm ERR! gyp ERR! find VS For more information consult the documentation at: npm ERR! npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows npm ERR! npm ERR! gyp ERR! find VS ** npm ERR! npm ERR! gyp ERR! find VS npm ERR! npm ERR! gyp ERR! configure error npm ERR! npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use npm ERR! npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\Scotch\AppData\Roaming\nvm\v18.18.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47) npm ERR! npm ERR! gyp ERR! stack at C:\Users\Scotch\AppData\Roaming\nvm\v18.18.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16 npm ERR! npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\Scotch\AppData\Roaming\nvm\v18.18.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:380:14) npm ERR! npm ERR! gyp ERR! stack at C:\Users\Scotch\AppData\Roaming\nvm\v18.18.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14 npm ERR! npm ERR! gyp ERR! stack at C:\Users\Scotch\AppData\Roaming\nvm\v18.18.1\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:401:16 npm ERR! npm ERR! gyp ERR! stack at C:\Users\Scotch\AppData\Roaming\nvm\v18.18.1\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7 npm ERR! npm ERR! gyp ERR! stack at C:\Users\Scotch\AppData\Roaming\nvm\v18.18.1\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16 npm ERR! npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:430:5) npm ERR! npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:517:28) npm ERR! npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1098:16) npm ERR! npm ERR! gyp ERR! System Windows_NT 10.0.19045 npm ERR! npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Scotch\AppData\Roaming\nvm\v18.18.1\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" npm ERR! npm ERR! gyp ERR! cwd C:\Users\Scotch\AppData\Local\npm-cache_cacache\tmp\git-clonemYAICG\node_modules\ffi-napi npm ERR! npm ERR! gyp ERR! node -v v18.18.1 npm ERR! npm ERR! gyp ERR! node-gyp -v v9.4.0 npm ERR! npm ERR! gyp ERR! not ok npm ERR! npm ERR! npm ERR! A complete log of this run can be found in: C:\Users\Scotch\AppData\Local\npm-cache_logs\2024-04-21T18_22_24_075Z-debug-0.log

npm ERR! A complete log of this run can be found in: C:\Users\Scotch\AppData\Local\npm-cache_logs\2024-04-21T18_20_19_038Z-debug-0.log PS C:\Temp\companion-module-vbaudio-voicemeeter-1.2.1>

thedist commented 2 months ago

That'd be because of how Voicemeeter does it's API, it's not a simple websocket or REST api that would trivially be able to be connected to natively within Node.js and work without a proxy. Instead it's a .dll file so it has to be accessed from an app running on the same machine as Voicemeeter, and binding to the dll is non-trivial and so some of these libraries required do make it more a complex setup.

Keep in mind it's amateur audio software, not designed as a professional solution, so I'm trying to make do with the limitations of Voicemeeter within the constraints of Companion.

dimkasta commented 2 months ago

Yarn seems to work a bit better than npm, but it still does not work on windows

Node-gyp 10 cannot be built on windows. You get an error that call is not recognised. You can downgrade it to 9.4, but then you get an error from index.js that you cannot use "require" with ES Modules. Which is because node-fetch 3 stopped support for "require" importing of ES modules in favor of imports. Which is probably an issue in your TS config?

People ask me why I hate TS and JS... I don' t know what to tell them...

thedist commented 2 months ago

I am looking in to ways to simplify installation, such as seeing the VBAN API will provide the data and capabilities needed without a performance hit compare to hooking to the dll directly. This wont be ready for the Companion v3.3.0 stable release though.

dimkasta commented 2 months ago

I am looking in to ways to simplify installation, such as seeing the VBAN API will provide the data and capabilities needed without a performance hit compare to hooking to the dll directly. This wont be ready for the Companion v3.3.0 stable release though.

yeah I had the same thought. The VBAN text command stream is probably the easiest to implement. Basically, all you need is a cli app to forward the text commands. I have already found one written in go and did a first implementation using simple shell button calls. It still needs some work to retrieve state, but actions are as easy as running

c:/voicemeetercommands/vban-cli 192.168.1.100 "Strip[0].Mute=1"

thedist commented 2 months ago

My plan to test VBAN is to directly send the VBAN packets from Companion to Voicemeeter, skipping any sort of 3rd party app that needs to be installed such as a cli, as that sort of missing the whole point of trying to simplify this Companion module for those who are not technical with pre-requisites of running NodeJS apps that build native modules.

thedist commented 1 month ago

So after some testing it appears that VBAN is not currently an option.

While VBAN would simply things greatly currently RT Packets are sent out on the same port that VBAN is running on, which means that if Voicemeeter is running on a separate machine to Companion then it wouldn't be an issue as Voicemeeter can run VBAN on 6980, and Companion can listen on 6980, but this also means if Companion is running on the same machine as Voicemeeter then Voicemeeter would be sending packets to the same port it's listening on (causing it to spam open the VBAN Chat window), and Companion would not be able to listen to the same port as it's in use by Voicemeeter.

I have reached out to VBurel (the VB Audio dev) and they're having a think about if having a separate destination port for VBAN in Voicemeeter could be something that can be implemented, which would allow for VBAN in Companion, but until that goes the go ahead and is implemented Companion will need to still use a direct connection.