0
点赞
收藏
分享

微信扫一扫

AntDesign X 报错:Cannot read properties of undefined (reading ‘_context‘)


解决:
Cannot read properties of undefined (reading '_context')

报错问题

我是基于umi的前端工程,react版本18.2,

package.json,全部安装完之后的
    "react": "^18.2.0",
     "@ant-design/x": "^1.0.5",

    "antd": "^5.2.2",

    "antd-style": "^3.7.1",

我是现有项目,想加x的组件,需要

1. npm install @ant-design/x --save

2. npm cache clean --force

3. rimraf node_modules (清理之前的node_modules)

4.npm install 重新装

如果过程中 提示.umi文件,那就把.umi文件夹删除或者重命名,先不报错再说,随后删掉就行了。

举报

相关推荐

0 条评论