简体   繁体   English

将 ionic 5 升级到 6 时,模块“@ionic/core”没有导出成员“setupIonicReact”

[英]Module '"@ionic/core"' has no exported member 'setupIonicReact' while upgrading ionic 5 to 6

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我正在尝试将我的 ionic React 应用程序更新到 6。我按照此处的说明进行操作: https://ionicframework.com/docs/intro/upgrading-to-ionic-6#react

I did:我做了:

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

setupIonicReact({
  mode: 'md'
});

What I'm doing wrong?我做错了什么?

I found the issue:我发现了问题:

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

should be this:应该是这样的:

import { setupIonicReact } from '@ionic/react';
                                 ____________

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM