nrkno / sofie-atem-connection

Sofie ATEM Connection: A Part of the Sofie TV Studio Automation System
https://github.com/nrkno/Sofie-TV-automation/
MIT License
129 stars 36 forks source link

Other: Vite React: Uncaught ReferenceError: __dirname is not defined #168

Closed AronBuzogany closed 3 weeks ago

AronBuzogany commented 3 weeks ago

About me

Working on a React app to control my Atem

Issue

When importing

import { Atem } from "atem-connection";

I get the following error:

Uncaught ReferenceError: __dirname is not defined

I am using Vite + React

nytamin commented 3 weeks ago

atem-connection is a node.js only library, it will not work in a browser.