mhaagens/react-mobx-react-router4-boilerplate

Question - build error on Heroku

tomaash opened this issue · 1 comments

Not sure how to contact otherwise, so I write here. I'm using:

  "engines": {
    "node": "~6.3.1",
    "npm": "~3.10.8"
  }

both locally and on Heroku. Locally, everything builds and runs fine. On Heroku, I get following error while building:

       ERROR in ./src/components/App.jsx
       Module not found: Error: Can't resolve './Subitem' in '/tmp/build_5c5bda8dc1b617e85c8e685c9a8928b9/tomaash-mobx-babel-starter-f3dc48b/src/components'
       @ ./src/components/App.jsx 80:98-144
       @ ./src/index.jsx
       @ multi app

It seems that this line is suddenly causing a problem:

<Match exactly pattern='/' component={require('react-router?name=home!./Home')} />

I needed to turn off dynamic routing to be able to build successfully:

<Match exactly pattern='/' component={Home} />

I couldn't find anything about dynamic routing in react-router@next docs. Are there other ways to define it? Or did you encounter this issue and fixed it with some configuration?
Btw, this boilerplate is awesome. Great libraries, no-nonsense webpack config.

Nevermind, I cannot properly spell uppercase filenames :p