0

I'm working with a react ionic project, after installing the node modules and trying to run the project, the below issue is displayed:

"./node_modules/@tonaljs/scale-type/dist/index.mjs Can't import the named export 'EmptyPcset' from non EcmaScript module (only default export is available)"

My packages version:

  • tonaljs/tonal: 4.6.5
  • react-scripts: 4.0.2
  • react: 17.0.2
  • typescript: 4.1.3
  • ionic/react: 6.0.1
  • Ionic CLI : 6.20.3
  • Ionic Framework : @ionic/react 6.6.3
  • cordova-res : 0.15.4
  • native-run : 1.7.2
  • NodeJS : v14.18.1
  • npm : 6.14.15
  • OS : Linux 5.19

I tried to update the tonaljs/tonal, and/or react-scripts to the newer versions with no luck. There is a solution that stated that we should update the webpack configuration but I couldn't find the file in react ionic and I didn't get it how to update the configuration.

rawad nasr
  • 11
  • 2

1 Answers1

0

Ionic React uses Create React App (CRA) to build the app.

With Create React App, normally you cannot edit the configuration-- prohibiting configuration edits is how CRA ensures it is easy to upgrade.

To modify the webpack config, you have two options:

Patrick Kenny
  • 4,515
  • 7
  • 47
  • 76