svassr svassr - 8 months ago 70
React JSX Question

React-server failling without error

I created a simple project from generator-react-server . Everything worked fine.

I just created new route a new page and a new component and changes hello-world.js (page and component) for home.js.

Now when running

npm start
react-server start
the server shutdown without returning any particular error but the following logs (note that it was already logging the same mesage when it worked before).

2016-10-21T15:44:01.071Z - warning: [react-server-cli.src.logProductionWarnings] PRODUCTION WARNING: the following current settings are discouraged in production environments. (If you are developing, carry on!):
2016-10-21T15:44:01.075Z - warning: [react-server-cli.src.logProductionWarnings] -- Minification is disabled. To enable, set minify to true (--minify at the command-line) or set NODE_ENV=production.
2016-10-21T15:44:01.076Z - warning: [react-server-cli.src.logProductionWarnings] -- Long-term caching is disabled. To enable, set longTermCaching to true (--long-term-caching at the command-line) or set NODE_ENV=production to turn on.
2016-10-21T15:44:01.076Z - info: [react-server-cli.src.logProductionWarnings] NODE_ENV is set to undefined


The issue was the route defined in routes.js was still pointing to a page that didn't exist anymore (page property). The route could not resolve.

routes.js :

  "middleware": [],
  "routes": {
  "Homepage": {
    "path": "/",
    "page": "pages/home.js"