React-router: Can't resolve ./StaticRouter

Created on 30 Jan 2017  ·  10Comments  ·  Source: ReactTraining/react-router

Build error with latest version of react-router

Version

4.0.0-beta.2

ERROR in ./~/react-router/index.js
Module not found: Error: Can't resolve './StaticRouter' in '/Users/mdurling/Repos/inmotionnow/proximus/node_modules/react-router'
@ ./~/react-router/index.js 26:21-46

There is no StaticRouter.js file in the package

Most helpful comment

@mdurling I don't think it will take to long as next release fixes this critical issue + one related to react-router-dom

All 10 comments

This was fixed via #4389 we just need to wait while it is pushed up to npm

same here!!

Will be fixed in next release as @IljaDaderko said

@IljaDaderko @pshrmn Any idea how soon that might be? I don't want to implement any temporary measures if this fix is coming quickly, but our deployment is currently broken.

@mdurling I don't think it will take to long as next release fixes this critical issue + one related to react-router-dom

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

There might be some issues about installation scripts:

// package.json
"react-router": "git://github.com/ReactTraining/react-router.git#v4",
[4/4] 📃  Building fresh packages...
⠁
⠁
⠁
⠁
error /path/to/project/node_modules/react-router: Command failed.
Exit code: 127
Command: sh
Arguments: -c lerna bootstrap
Directory: /path/to/project/node_modules/react-router
Output:
sh: lerna: command not found
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

This has been pushed see PR #4388

This repo is not setup to allow dependency directly to git. See #4358

Additionally the fix has been pushed to npm.

This is fixed in beta 3. Sorry about the inconvenience. Please update! npm install react-router-dom@next

@imWildCat We do not support installing directly from GitHub for a variety of reasons. Please install from npm instead :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomatau picture tomatau  ·  3Comments

misterwilliam picture misterwilliam  ·  3Comments

Waquo picture Waquo  ·  3Comments

stnwk picture stnwk  ·  3Comments

ackvf picture ackvf  ·  3Comments