We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
持续更新。
[email protected] 已被 unpublish,理论上不会再遇到这个问题,遇到的重装 node_modules 后再试。
使用的 react-router 和 react-router-dom 版本不同,通常出现在 ant-design-pro 的用户中,因为 ant-design-pro 手动依赖了一个 react-router-dom@^4.3.1,^ 前缀引让 npm/yarn 下载依赖时匹配到 [email protected]。
react-router-dom@^4.3.1
^
修改 package.json 中 react-router-dom 的依赖为 4.3.1。能解决问题,但治标不治本,下次 umi 把 react-router 升级到 4.4,就又挂了。
参考 ant-design-pro!3787 修复,删除 react-router-dom 依赖,路由功能全部走 umi。
history 发布了 4.9,而 roadhog 之前版本对于 @babel/runtime 的处理不恰当。
@babel/runtime
新建 webpack.config.js,内容如下:
export default function(webpackConfig) { delete webpackConfig.resolve.alias['@babel/runtime']; return webpackConfig; }
roadhog 依赖升级为 ^2.5.0-beta.4 。
^2.5.0-beta.4
The text was updated successfully, but these errors were encountered:
feat: Cannot read property 'Consumer' of undefined
7a0f2d1
sorrycc/blog#82
感谢
Sorry, something went wrong.
No branches or pull requests
Cannot read property 'Consumer' of undefined
原因
使用的 react-router 和 react-router-dom 版本不同,通常出现在 ant-design-pro 的用户中,因为 ant-design-pro 手动依赖了一个
react-router-dom@^4.3.1
,^
前缀引让 npm/yarn 下载依赖时匹配到 [email protected]。解决
方法一(别这么干)
修改 package.json 中 react-router-dom 的依赖为 4.3.1。能解决问题,但治标不治本,下次 umi 把 react-router 升级到 4.4,就又挂了。
方法二(推荐)
参考 ant-design-pro!3787 修复,删除 react-router-dom 依赖,路由功能全部走 umi。
Module not found: Can't resolve '@babel/runtime/helpers/...'
原因
history 发布了 4.9,而 roadhog 之前版本对于
@babel/runtime
的处理不恰当。解决
方法一
新建 webpack.config.js,内容如下:
方法二
roadhog 依赖升级为
^2.5.0-beta.4
。The text was updated successfully, but these errors were encountered: