Ant-design-pro: "export '__RouterContext' was not found in 'react-router'

Created on 16 Mar 2019  ·  7Comments  ·  Source: ant-design/ant-design-pro

"export '__RouterContext' was not found in 'react-router'

Most helpful comment

是react-router-dom": "^4.3.1"依赖的问题,将^去掉,不然会安装4.3.4版本

All 7 comments

i have the same problem in 2.2.1

一样的报错 怎么克隆低版本的啊

一样的报错,是不是依赖升级的缘故?

一样的报错。前天还没有出现:

[my-project] yarn start                                                       15:32:04  ☁  master ☀
yarn run v1.13.0
$ cross-env APP_TYPE=site umi dev
Warning: Please use `require("react-router").matchPath` instead of `require("react-router/matchPath")`. Support for the latter will be removed in the next major release.
Warning: Please use `require("react-router").Router` instead of `require("react-router/Router")`. Support for the latter will be removed in the next major release.
Warning: Please use `require("react-router").Switch` instead of `require("react-router/Switch")`. Support for the latter will be removed in the next major release.
Warning: Please use `require("react-router").Route` instead of `require("react-router/Route")`. Support for the latter will be removed in the next major release.

是react-router-dom": "^4.3.1"依赖的问题,将^去掉,不然会安装4.3.4版本

Same issue. Like the react-router-dom has published 4.4.0

First, delete the symbol '^' of "react-router-dom": "^4.3.1" from package.json.
Then, remove the package-lock.json and node_modules/ directory.
Run npm install again.

Quote from @RootAnt

rm -rf build,记得把之前 build 过的文件也删掉!重新生成 build

Was this page helpful?
0 / 5 - 0 ratings

Related issues

suifan picture suifan  ·  3Comments

Yoping picture Yoping  ·  3Comments

wuyongdec picture wuyongdec  ·  3Comments

lvzheng0404 picture lvzheng0404  ·  3Comments

Jerry-goodboy picture Jerry-goodboy  ·  3Comments