Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

153
Views
"Module not found" while deploying react-app to heroku

I'm trying to deploy my react-app using Heroku, but it keeps giving me this error :

Module not found: Error: Can't resolve './pages/Courselesson' in '/tmp/build_b7e086f6/src'

And I'm sure the component is named correctly and it's inside the folder "pages".

Here is the complete build log from heroku :

    -----> Building on the Heroku-20 stack
-----> Using buildpack: https://github.com/mars/create-react-app-buildpack.git
-----> React.js (create-react-app) multi app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-multi.git
=====> Detected Framework: Multipack
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
=====> Detected Framework: Node.js
       
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
       
-----> Installing binaries
       engines.node (package.json):  16.3.0
       engines.npm (package.json):   unspecified (use default)
       
       Resolving node version 16.3.0...
       Downloading and installing node 16.3.0...
       Using default npm version: 7.15.1
       
-----> Installing dependencies
       Installing node modules
       
       added 1436 packages, and audited 1437 packages in 26s
       
       165 packages are looking for funding
         run `npm fund` for details
       
       6 moderate severity vulnerabilities
       
       To address all issues (including breaking changes), run:
         npm audit fix --force
       
       Run `npm audit` for details.
       
-----> Build
       Running build
       
       > fomwam@0.1.0 build
       > react-scripts build
       
       Creating an optimized production build...
       Failed to compile.
       
       Module not found: Error: Can't resolve './pages/Courselesson' in '/tmp/build_b7e086f6/src'
       
       
-----> Build failed
       
       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys
       
       If you're stuck, please submit a ticket so we can help:
       https://help.heroku.com/
       
       Love,
       Heroku
       
 !     Push rejected, failed to compile React.js (create-react-app) multi-app.
 !     Push failed

I used this plugin this case-sensitive plugin but still, it doesn't work.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!