amazon-connect / amazon-connect-streams

Amazon Connect Streams - a browser-based contact center integration API, typically with CRM systems.
https://docs.aws.amazon.com/connect/latest/userguide/
Apache License 2.0
388 stars 311 forks source link

I am getting the below error while compiling the application with Webpack #899

Open ammmarr opened 1 month ago

ammmarr commented 1 month ago
          I am getting the below error while compiling the application with Webpack

ERROR in ./node_modules/amazon-connect-streams/release/connect-streams.js 108:32 Module parse failed: Unexpected token (108:32) You may need an appropriate loader to handle this file type. | } | const iframeIdSelector = iframe[id='${appName}'];

const iframe = containerDOM?.querySelector(iframeIdSelector) ||

| document.getElementById(appName) || | window.top.document.getElementById(appName); @ ./app/Dashboard/Dashboard.js 14:0-32 @ ./app/Dashboard/index.js @ ./app/routes/asyncLoad.js @ ./app/routes/routes.js @ ./app/routes/index.js @ ./app/components/App/App.js @ ./app/components/App/index.js @ ./app/app.js @ multi ./node_modules/react-app-polyfill/ie11.js webpack-hot-middleware/client?reload=true ./app/app.js

Originally posted by @SukheshEV in https://github.com/amazon-connect/amazon-connect-streams/issues/644#issuecomment-2199324033

beallc commented 1 month ago

Can you please provide more information about your configuration or possibly a sample application that recreates the issue?

seiyako commented 3 weeks ago

What version of StreamsJS do you use? The version you're trying to compile with your app might not have the babel transpilation enabled yet thus the new JS syntax ?. remains not transformed so your compilation failed. Can you try a newer version of StreamsJS?