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.