TeamDotworld / dahua-rtsp-web

Stream video in web browser
MIT License
55 stars 23 forks source link

SyntaxError: Cannot use import statement outside a module #24

Open RobbyGit opened 2 years ago

RobbyGit commented 2 years ago

Hi there

I would love to use this with out Dahua camera but I have to admit not understanding how to run it.

I did the following:

  1. cloned the directory
  2. Then npm install
  3. Then npm run build

Now I run node index.js and I get the following error

SyntaxError: Cannot use import statement outside a module

Am i just to much of a newbe to run this ?

Thanks

Robby

Just625 commented 2 years ago

I think you are supposed to serve the dist folder after the "npm run build" command instead of running "node index.js"

arnotixe commented 1 year ago

try

npm i -g serve
npm run build
serve dist

then go http://localhost:3000