twilio / video-quickstart-js

A quickstart and code samples for Twilio Video JavaScript SDK. https://www.twilio.com/docs/video
Other
389 stars 337 forks source link

npm start not working #213

Closed sjcotto closed 2 years ago

sjcotto commented 2 years ago

just cloned the repo and the npm install && npm start is not working, receiving the following error

> copyfiles -f examples/bandwidthconstraints/src/helpers.js examples/bandwidthconstraints/public && browserify examples/bandwidthconstraints/src/index.js > examples/bandwidthconstraints/public/index.js

Error: Parsing file /Users/user/projects/goshops/video-quickstart-js/node_modules/twilio-video/es5/dynamicImport.js: Unexpected token (8:9)
    at Deps.parseDeps (/Users/user/projects/goshops/video-quickstart-js/node_modules/module-deps/index.js:481:28)
    at getDeps (/Users/user/projects/goshops/video-quickstart-js/node_modules/module-deps/index.js:414:40)
    at /Users/user/projects/goshops/video-quickstart-js/node_modules/module-deps/index.js:398:32
    at ConcatStream.<anonymous> (/Users/user/projects/goshops/video-quickstart-js/node_modules/concat-stream/index.js:36:43)

tried with differents nodejs versions

timmydoza commented 2 years ago

Hey @sjcotto - thanks for the issue!

I can reproduce this one on my end. It looks like the older version of browserify that we use in the quickstart doesn't work well with the new import keyword that we recently introduced in the source code of the twilio-video SDK. I find that simply upgrading browserify to the most recent version solves this issue:

npm install -S browserify@17

We'll get this fix merged into the code very soon.

timmydoza commented 2 years ago

Thanks again for reporting this @sjcotto! The fix has now been merged.