question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error on npm start

See original GitHub issue

Hello, with that latest bits with react-router-redux, I do see an error that is repeated in the console. The app still seems to run though, so not sure what is happening here:

Warning: Failed propType: Required prop router was not specified in RouterContext. Warning: Failed propType: Required prop location was not specified in RouterContext. Warning: Failed propType: Required prop routes was not specified in RouterContext. Warning: Failed propType: Required prop params was not specified in RouterContext. Warning: Failed propType: Required prop components was not specified in RouterContext. Warning: [react-router] <RouterContext> expects a router rather than a history Unhandled rejection TypeError: Cannot read property ‘listenBeforeLeavingRoute’ of undefined at [object Object].getChildContext (/Users/Troy/Documents/Projects/3ree-master/node_modules/react-router/lib/RouterContext.js:75:35) at [object Object].ReactCompositeComponentMixin._processChildContext (/Users/Troy/Documents/Projects/3ree-master/node_modules/react/lib/ReactCompositeComponent.js:326:53) at [object Object].ReactCompositeComponentMixin.mountComponent (/Users/Troy/Documents/Projects/3ree-master/node_modules/react/lib/ReactCompositeComponent.js:225:100) at [object Object].wrapper as mountComponent at Object.ReactReconciler.mountComponent (/Users/Troy/Documents/Projects/3ree-master/node_modules/react/lib/ReactReconciler.js:37:35) at ReactDOMComponent.ReactMultiChild.Mixin.mountChildren (/Users/Troy/Documents/Projects/3ree-master/node_modules/react/lib/ReactMultiChild.js:241:44) at ReactDOMComponent.Mixin._createContentMarkup (/Users/Troy/Documents/Projects/3ree-master/node_modules/react/lib/ReactDOMComponent.js:591:32) at ReactDOMComponent.Mixin.mountComponent (/Users/Troy/Documents/Projects/3ree-master/node_modules/react/lib/ReactDOMComponent.js:479:29) at Object.ReactReconciler.mountComponent (/Users/Troy/Documents/Projects/3ree-master/node_modules/react/lib/ReactReconciler.js:37:35) at [object Object].ReactCompositeComponentMixin.mountComponent (/Users/Troy/Documents/Projects/3ree-master/node_modules/react/lib/ReactCompositeComponent.js:225:34) at [object Object].wrapper as mountComponent at /Users/Troy/Documents/Projects/3ree-master/node_modules/react/lib/ReactServerRendering.js:42:38 at ReactServerRenderingTransaction.Mixin.perform (/Users/Troy/Documents/Projects/3ree-master/node_modules/react/lib/Transaction.js:136:20) at Object.renderToString (/Users/Troy/Documents/Projects/3ree-master/node_modules/react/lib/ReactServerRendering.js:40:24) at app.js:38:35 at /Users/Troy/Documents/Projects/3ree-master/node_modules/react-router/lib/match.js:65:5 From previous event: at handleRender (app.js:16:4) at Layer.handle as handle_request at next (/Users/Troy/Documents/Projects/3ree-master/node_modules/express/lib/router/route.js:131:13) at Route.dispatch (/Users/Troy/Documents/Projects/3ree-master/node_modules/express/lib/router/route.js:112:3) at Layer.handle as handle_request at /Users/Troy/Documents/Projects/3ree-master/node_modules/express/lib/router/index.js:277:22 at param (/Users/Troy/Documents/Projects/3ree-master/node_modules/express/lib/router/index.js:349:14) at param (/Users/Troy/Documents/Projects/3ree-master/node_modules/express/lib/router/index.js:365:14) at Function.process_params (/Users/Troy/Documents/Projects/3ree-master/node_modules/express/lib/router/index.js:410:3) at next (/Users/Troy/Documents/Projects/3ree-master/node_modules/express/lib/router/index.js:271:10) at jsonParser (/Users/Troy/Documents/Projects/3ree-master/node_modules/body-parser/lib/types/json.js💯40) at Layer.handle as handle_request at trim_prefix (/Users/Troy/Documents/Projects/3ree-master/node_modules/express/lib/router/index.js:312:13) at /Users/Troy/Documents/Projects/3ree-master/node_modules/express/lib/router/index.js:280:7 at Function.process_params (/Users/Troy/Documents/Projects/3ree-master/node_modules/express/lib/router/index.js:330:12) at next (/Users/Troy/Documents/Projects/3ree-master/node_modules/express/lib/router/index.js:271:10) at urlencodedParser (/Users/Troy/Documents/Projects/3ree-master/node_modules/body-parser/lib/types/urlencoded.js:88:40) at Layer.handle as handle_request at trim_prefix (/Users/Troy/Documents/Projects/3ree-master/node_modules/express/lib/router/index.js:312:13)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
ryanyogancommented, Mar 1, 2016
  match({ routes, location: req.url }, (error, redirectLocation, renderProps) => {
    if (error) {
      console.log('Error', error);
      res.status(500).send(error);
    } else if (redirectLocation) {
      res.redirect(302, redirectLocation.pathname + redirectLocation.search);
    } else if (renderProps) {
      const devTools = (isDev) ? <DevTools /> : null;
      const html = renderToString(
        <RouterContext {...renderProps} />
      );
      res.render('index', { isProd: (!isDev), html: html });
    } else {
      res.status(404).send('Not Found');
    }
  });

@GordyD It looks like it is just an issue of keeping up with react-router’s fast moving changes. This is a bit more idiomatic.

0reactions
ReganHecommented, Jun 7, 2016

@ryanyogan is correct.the ‘renderProp’ is not always has value.when it doesn’t, the error reappears.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm start giving error in node.js - Stack Overflow
The error suggests that the ./bin/www directory is not found. Paths specified with a dot are relative to the current directory, ...
Read more >
npm err! missing script: start Solution - Career Karma
If you type npm start and get the npm err! missing script: start error, there must be a missing line in the script...
Read more >
How to fix npm start command not working - Nathan Sebhastian
How to fix npm start command not working · Check if the package.json file exists · Check if the start script is defined...
Read more >
npm start not working / How to fix npm error React ... - YouTube
code #coding # npm #react #coders #computerscience #cs #javascript #javaprogramming #react #reactjs if still not working please watch ...
Read more >
"The NPM script 'start' exited without indicating that the create ...
From the error message, it seems that the react-scripts.js module was not found, try to check the package.json file whether it contains the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found