1

I am trying migrate to launchdarkly-react-client-sdk 3.0.1 from 2.28.2. I installed the latest package. But when i am starting the application i am getting error and application is unable to start. Error:- ./node_modules/launchdarkly-js-client-sdk/dist/ldclient.es.js 624:11 Module parse failed: Unexpected token (624:11) File was processed with these loaders:

  • ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js You may need an additional loader to handle the result of these loaders. | le = /^(\w|.|-)+$/; | function de(e) {

return e?.replace(//+$/, ""); | } | function fe(e, t, n) {

I am trying to migrate to launchdarkly-react-client-sdk 3.0.1 from 2.28.2. I installed the latest package. But when i am starting the application i am getting error and application is unable to start. Error:- ./node_modules/launchdarkly-js-client-sdk/dist/ldclient.es.js 624:11 Module parse failed: Unexpected token (624:11) File was processed with these loaders:

  • ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js You may need an additional loader to handle the result of these loaders. | le = /^(\w|.|-)+$/; | function de(e) {

return e?.replace(//+$/, ""); | } | function fe(e, t, n) {

2 Answers2

0

I have received exactly the same error as you when trying to do the same thing. I'm going to write Launch Darkly Support to see if they can unravel this mystery.

RobertW
  • 226
  • 1
  • 2
  • 10
0

Are you using webpack 4? The migration guide specifies some of the breaking changes you may need to handle when updating:

https://docs.launchdarkly.com/sdk/client-side/react/web-migration-2-to-3

https://docs.launchdarkly.com/sdk/client-side/javascript/migration-2-to-3

Tore
  • 1,236
  • 2
  • 11
  • 21