versatica / mediasoup-client

mediasoup client side JavaScript library
https://mediasoup.org
ISC License
591 stars 237 forks source link

'awaitqueue' reports an error after upgrading to version 3. There is no problem with version 2. #287

Closed panhezeng closed 11 months ago

panhezeng commented 11 months ago

Bug Report

IMPORTANT: We primarily use GitHub as an issue tracker. Just open an issue here if you have encountered a bug in mediasoup-client.

If you have questions or doubts about mediasoup-client or need support, please use the mediasoup Discourse Group instead:

https://mediasoup.discourse.group

Your environment

Issue description

ERROR in ./node_modules/mediasoup-client/node_modules/awaitqueue/lib/index.js 12:23 Module parse failed: Unexpected token (12:23) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | class AwaitQueueStoppedError extends Error { | constructor(message) {

    super(message ?? 'AwaitQueu
ibc commented 11 months ago

Use a modern version of webpack or use a loader in webpack to load AwaitQueue and mediasoup-client libs. They use modern JavaScript ES. This is not a bug.

If you need help ask in the mediasoup forum (not here in GitHub).

panhezeng commented 11 months ago

Use a modern version of webpack or use a loader in webpack to load AwaitQueue and mediasoup-client libs. They use modern JavaScript ES. This is not a bug.

If you need help ask in the mediasoup forum (not here in GitHub).

You should use babel loader and add AwaitQueue and mediasoup-client to the transpile configuration ?