1

This only occurs when I am trying to deploy to production both on Heroku and AWS Elastic beanstalk so I know it has to do with my application.

When deploying and failing, the logs read:

Module not found: Error: Can't resolve './components/waitlist' in '/var/app/ondeck/app/javascript/waitlist'

The file tree shows:

javascript
  |_home
    |_ components
      |_ App.jsx // import Waitlist from '../../waitlist
  |_waitlist
    |_components
      |_waitlist.jsx
    index.js

I know it's reading the index.js file because the log reads:

@ ./app/javascript/waitlist/index.jsx 1:0-45
@ ./app/javascript/home/components/App.jsx

The first line of waitlist/index.js reads:

export { default } from './components/waitlist';

I've tried importing it as a variable and then exporting it but it does not seem to be able to find the file. I've also tried changing the file extensions between js and jsx and requiring via an absolute path (app/javascript/waitlist/components/waitlist) with no success.

The application works fine using webpack-dev-sever on development however. Any help would be appreciated!

Jeff
  • 650
  • 5
  • 16

0 Answers0