Can't get a libary working

Joined
Jan 26, 2023
Messages
1
Reaction score
0
I'm running into a problem with this libary. I have asked chatGPT, but it aint givin me adequate answers.

This is the code:
const vMix = require('node-vmix')
const vmx = new vMix({
host: '192.168.1.102',
port: 8088
});

This is the error i get:
const vmx = new vMix(

^

TypeError: vMix is not a constructor



I have Node.js installed and also have installed vmix-js-utils with npm flawlessly.
I tried installing different versions of this libary and i also installed the latest node.js
Here is the documentation: https://github.com/jensstigaard/node-vmix
 
Joined
Jan 30, 2023
Messages
107
Reaction score
13
The error message suggests that the imported module node-vmix is not a constructor. Make sure that you have imported the correct module, and try initializing the instance like this:

PHP:
const vMix = require('node-vmix').vMix;
const vmx = new vMix({
  host: '192.168.1.102',
  port: 8088
});

Also, verify that the specified host and port are correct, and the vMix software is running on the specified IP and port.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top