giraldi
(giraldi)
April 30, 2020, 10:07am
1
Hello,
I installed the latest version of the mediasoup-client in my react 16.8.6 app and after running npm start, I am getting the following error
./node_modules/mediasoup-client/lib/handlers/Safari12.js
Module parse failed: Unexpected token (111:12)
You may need an appropriate loader to handle this file type.
| bundlePolicy: 'max-bundle',
| rtcpMuxPolicy: 'require',
| ...additionalSettings
| }, proprietaryConstraints);
| // Handle RTCPeerConnection connection status.
I added the import as documented in the mediasoup-client install guide (https://mediasoup.org/documentation/v3/mediasoup-client/installation/ )
import * as mediasoup from "mediasoup-client";
I am using webpack but do not have a webpack.config.js
Most likely not related to the mediasoup-client itself, but I am just wondering if anyone ran into this error before.
Thanks
ibc
(Iñaki Baz Castillo)
April 30, 2020, 10:16am
2
It’s kinda amazing that you don’t even explain whether you are using React, webpack, or what, and just paste the final error. mediasoup-client
does not have any file with .jsModule
extension so you are using “something”. You just did not tell it.
giraldi
(giraldi)
April 30, 2020, 10:34am
3
sorry about that - I have edited my initial post - did not mean to start off on the wrong foot.
ibc
(Iñaki Baz Castillo)
April 30, 2020, 10:54am
4
giraldi:
./node_modules/mediasoup-client/lib/handlers/Safari12.js Module parse failed: Unexpected token (111:12) You may need an appropriate loader to handle this file type. | bundlePolicy: ‘max-bundle’, | rtcpMuxPolicy: ‘require’, | …additionalSettings
It’s due the ...
. You need a modern Node version to build it.
giraldi
(giraldi)
April 30, 2020, 10:58am
5
Thank you very much for your response. I will definitely look at my Node version. Have a good rest of the day and I hope that all is well.