react-router-dom missing modules

Created on 30 Jan 2017  路  3Comments  路  Source: ReactTraining/react-router

Version

[email protected]

https://unpkg.com/[email protected]/

Steps to reproduce

Trying to run the animated transitions demo.

import {
  BrowserRouter as Router,
  Route,
  Link,
  Redirect
} from 'react-router-dom'

Expected Behavior

馃帀

Actual Behavior

Failed to compile with 9 errors.

 ERROR  in ./~/react-router-dom/index.js
Module not found: Error: Can't resolve './MemoryRouter' in '/path/to/node_modules/react-router-dom'
 @ ./~/react-router-dom/index.js 18:21-46

 ERROR  in ./~/react-router-dom/index.js
Module not found: Error: Can't resolve './Prompt' in '/path/to/node_modules/react-router-dom'
 @ ./~/react-router-dom/index.js 26:15-34

 ERROR  in ./~/react-router-dom/index.js
Module not found: Error: Can't resolve './Redirect' in '/path/to/node_modules/react-router-dom'
 @ ./~/react-router-dom/index.js 30:17-38

 ERROR  in ./~/react-router-dom/index.js
Module not found: Error: Can't resolve './Route' in '/path/to/node_modules/react-router-dom'
 @ ./~/react-router-dom/index.js 34:14-32

 ERROR  in ./~/react-router-dom/index.js
Module not found: Error: Can't resolve './Router' in '/path/to/node_modules/react-router-dom'
 @ ./~/react-router-dom/index.js 38:15-34

 ERROR  in ./~/react-router-dom/index.js
Module not found: Error: Can't resolve './StaticRouter' in '/path/to/node_modules/react-router-dom'
 @ ./~/react-router-dom/index.js 42:21-46

 ERROR  in ./~/react-router-dom/index.js
Module not found: Error: Can't resolve './Switch' in '/path/to/node_modules/react-router-dom'
 @ ./~/react-router-dom/index.js 46:15-34

 ERROR  in ./~/react-router-dom/index.js
Module not found: Error: Can't resolve './matchPath' in '/path/to/node_modules/react-router-dom'
 @ ./~/react-router-dom/index.js 50:18-40

 ERROR  in ./~/react-router-dom/index.js
Module not found: Error: Can't resolve './withRouter' in '/path/to/node_modules/react-router-dom'
 @ ./~/react-router-dom/index.js 54:19-42

Most helpful comment

Thanks, @insin. Published in 4.0.0-beta.3

npm install react-router-dom@next

All 3 comments

Merged in #4391. Just needs a release and we'll be good.

If you are eager to use the beta; you can move the missing file from node_modules/react-router to node_modules/react-router-dom, and rename ServerRouter.js to StaticRouter.js

Thanks, @insin. Published in 4.0.0-beta.3

npm install react-router-dom@next
Was this page helpful?
0 / 5 - 0 ratings

Related issues

davetgreen picture davetgreen  路  3Comments

wzup picture wzup  路  3Comments

ArthurRougier picture ArthurRougier  路  3Comments

maier-stefan picture maier-stefan  路  3Comments

alexyaseen picture alexyaseen  路  3Comments