Home > other >  Module '"@ionic/core"' has no exported member 'setupIonicReact' while
Module '"@ionic/core"' has no exported member 'setupIonicReact' while

Time:01-18

I'm trying to update my ionic React app to 6. I followed the instructions here: https://ionicframework.com/docs/intro/upgrading-to-ionic-6#react

I did:

  1. Step 1 npm install react@latest react-dom@latest
  2. Step 2 npm install @ionic/react@6 @ionic/react-router@6
  3. Step 3 ...
  4. Step 4: I get:
import { setupIonicReact } from '@ionic/react';
^^^^^^
ERROR: Module '"@ionic/core"' has no exported member 'setupIonicReact'.ts(2305)
...

setupIonicReact({
  mode: 'md'
});

What I'm doing wrong?

CodePudding user response:

I found the issue:

import { setupIonicReact } from '@ionic/core';

should be this:

import { setupIonicReact } from '@ionic/react';
                                 ____________
  •  Tags:  
  • Related