尝试导入错误:“ReactReduxContext"未从“react-redux"导出 [英] Attempted import error: 'ReactReduxContext' is not exported from 'react-redux'

查看:90
本文介绍了尝试导入错误:“ReactReduxContext"未从“react-redux"导出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置一个新的 react-admin 控制台(按照官方教程:https://marmelab.com/react-admin/Tutorial.html).react-admin 当前版本是 3.3.1.

I am trying to setting up a new react-admin console (following the offcial tutorial : https://marmelab.com/react-admin/Tutorial.html). The current version of react-admin is 3.3.1.

但是当执行命令 yarn start 时出现以下错误:

But when execute command yarn start the following error occured :

./node_modules/ra-core/esm/core/CoreAdminContext.js
Attempted import error: 'ReactReduxContext' is not exported from 'react-redux'.

我能做什么?

推荐答案

删除你的纱线锁/包锁和yarn install.

Delete your yarn lock / package lock and yarn install.

根据这个线程

问题来自重复的 Redux 包,来自重复的react-admin 依赖项,来自过时的数据提供者(为 2.9 而设计,而 react-admin 在 3.x 中).要么升级你的data provider,或者将 react-admin 降级到 2.9.

The problem comes from duplicate Redux packages, coming from duplicate react-admin dependencies, coming from an outdated data provider (designed for 2.9 while react-admin is in 3.x). Either upgrade your data provider, or downgrade react-admin to 2.9.

这篇关于尝试导入错误:“ReactReduxContext"未从“react-redux"导出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆