- Notifications
You must be signed in to change notification settings - Fork 98
Closed
Description
So this is my code and I keep getting the error that EventEmitter cannot be used as a type.
I remove my node modules folder did a clean install. Anyone have a clue why it keeps complaining about that?
import OBSWebSocket from 'obs-websocket-js' import { OBS_SETTINGS } from '../config.js' class OBS { private socketURL: string private socket: OBSWebSocket constructor() { this.socketURL = OBS_SETTINGS.getSocketURL() } public async connect() { this.socket = new OBSWebSocket() return await this.socket.connect(this.socketURL) } }
The Error:
node_modules/obs-websocket-js/dist/base.d.ts:23:56 - error TS2507: Type 'typeof import("D:/Development/silon-server-twitch/node_modules/eventemitter3/index")' is not a constructor function type. 23 export declare abstract class BaseOBSWebSocket extends EventEmitter<MapValueToArgsArray<EventTypes>> { ~~~~~~~~~~~~ node_modules/obs-websocket-js/dist/base.d.ts:27:34 - error TS2709: Cannot use namespace 'EventEmitter' as a type. 27 protected internalListeners: EventEmitter<string | symbol, any>; ~~~~~~~~~~~~ Found 2 errors in the same file, starting at: node_modules/obs-websocket-js/dist/base.d.ts:23
Versions Used:
- obs-websocket-js version: 5.0.3
- node version: v18.14.1
Metadata
Metadata
Assignees
Labels
No labels