Skip to content

Trying to implement huddly SDK/API although doing the npm install #586

@avassist

Description

@avassist

I am following the current instructions huddly-sdk

However I am getting the following errors from Node.js. stating that “MODULE NOT FOUND” and “Uncaught ReferenceError: sdk is not defined”

Here are the codes written in along with the errors below following below:

Welcome to Node.js v16.20.2.
Type ".help" for more information.

const HuddlyDeviceAPIUSB = require('@huddly/device-api-usb').default;
**Uncaught Ehuddly node js errorceApiIP = require('@huddly/device-api-ip').default;
Uncaught Error: Cannot find module '@huddly/device-api-ip'
Require stack:

at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15) at Function.Module._load (node:internal/modules/cjs/loader:873:27) at Module.require (node:internal/modules/cjs/loader:1100:19) at require (node:internal/modules/cjs/helpers:119:18) { code: 'MODULE_NOT_FOUND', requireStack: [ '' ] }

const HuddlySdk = require('@huddly/sdk').default;
Uncaught Error: Cannot find module '@huddly/sdk'
Require stack:

at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15) at Function.Module._load (node:internal/modules/cjs/loader:873:27) at Module.require (node:internal/modules/cjs/loader:1100:19) at require (node:internal/modules/cjs/helpers:119:18) { code: 'MODULE_NOT_FOUND', requireStack: [ '' ] }

const usbApi = new HuddlyDeviceAPIUSB();
Uncaught ReferenceError: HuddlyDeviceAPIUSB is not defined
const ipApi = new HuddlyDeviceApiIP();
Uncaught ReferenceError: HuddlyDeviceApiIP is not defined
const sdk = new HuddlySdk([usbApi, ipApi], [usbApi, ipApi]);
Uncaught ReferenceError: HuddlySdk is not defined
let cameraManager;
undefined
sdk.on('ATTACH', (newDevice) => {
... cameraManager = newDevice;
... });
Uncaught ReferenceError: sdk is not defined
sdk.init();
Uncaught ReferenceError: sdk is not defined
sdk.on('ATTACH', (newDevice) => {
... cameraManager = newDevice;
... cameraManager.getInfo().then(console.log);
... });
Uncaught ReferenceError: sdk is not defined

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions