I checked various solutions over here, none were working for me. I learned that case-sensitive things also matter. So even I changed the file which was case sensitive (../middleware/auth.js to ../middleware/Auth.js). But it is showing the same error. What I'm missing over please help me.
2022-09-07T18:19:22.823335+00:00 app[api]: Enable Logplex by user kondrayeshwanth585@gmail.com
2022-09-07T18:19:22.823335+00:00 app[api]: Release v2 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:27:15.817481+00:00 app[api]: Set PORT config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:27:15.817481+00:00 app[api]: Release v3 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:27:58.968498+00:00 app[api]: Release v4 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:27:58.968498+00:00 app[api]: Set DB_URI config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:28:10.357015+00:00 app[api]: Set JWT_SECRET config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:28:10.357015+00:00 app[api]: Release v5 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:28:21.901769+00:00 app[api]: Release v6 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:28:21.901769+00:00 app[api]: Set JWT_EXPIRE config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:28:37.760415+00:00 app[api]: Set COOKIE_EXPIRE config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:28:37.760415+00:00 app[api]: Release v7 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:28:46.072107+00:00 app[api]: Set SMPT_SERVICE config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:28:46.072107+00:00 app[api]: Release v8 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:29:04.183409+00:00 app[api]: Release v9 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:29:04.183409+00:00 app[api]: Set SMPT_MAIL config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:29:23.314180+00:00 app[api]: Set SMPT_PASSWORD config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:29:23.314180+00:00 app[api]: Release v10 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:29:37.905398+00:00 app[api]: Release v11 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:29:37.905398+00:00 app[api]: Set SMPT_HOST config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:29:48.996076+00:00 app[api]: Set SMPT_PORT config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:29:48.996076+00:00 app[api]: Release v12 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:30:01.171815+00:00 app[api]: Release v13 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:30:01.171815+00:00 app[api]: Set STRIPE_API_KEY config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:30:15.336000+00:00 app[api]: Set STRIPE_SECRET_KEY config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:30:15.336000+00:00 app[api]: Release v14 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:30:29.627055+00:00 app[api]: Set CLOUDINARY_NAME config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:30:29.627055+00:00 app[api]: Release v15 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:30:40.022700+00:00 app[api]: Set CLOUDINARY_API_KEY config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:30:40.022700+00:00 app[api]: Release v16 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:30:53.721351+00:00 app[api]: Release v17 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:30:53.721351+00:00 app[api]: Set CLOUDINARY_API_SECRET config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:31:40.416647+00:00 app[api]: Set NODE_ENV config vars by user kondrayeshwanth585@gmail.com
2022-09-07T18:31:40.416647+00:00 app[api]: Release v18 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:32:37.000000+00:00 app[api]: Build started by user kondrayeshwanth585@gmail.com
2022-09-07T18:35:20.876839+00:00 app[api]: Deploy 8e97d750 by user kondrayeshwanth585@gmail.com
2022-09-07T18:35:20.876839+00:00 app[api]: Release v19 created by user kondrayeshwanth585@gmail.com
2022-09-07T18:35:20.894872+00:00 app[api]: Scaled to web@1:Free by user kondrayeshwanth585@gmail.com
2022-09-07T18:35:27.000000+00:00 app[api]: Build succeeded
2022-09-07T18:35:34.374454+00:00 heroku[web.1]: Starting process with command `node backend/server.js`
2022-09-07T18:35:37.100116+00:00 app[web.1]: node:internal/modules/cjs/loader:959
2022-09-07T18:35:37.100127+00:00 app[web.1]: throw err;
2022-09-07T18:35:37.100127+00:00 app[web.1]: ^
2022-09-07T18:35:37.100128+00:00 app[web.1]:
2022-09-07T18:35:37.100128+00:00 app[web.1]: Error: Cannot find module '../middleware/Auth'
2022-09-07T18:35:37.100128+00:00 app[web.1]: Require stack:
2022-09-07T18:35:37.100128+00:00 app[web.1]: - /app/backend/routes/product.js
2022-09-07T18:35:37.100129+00:00 app[web.1]: - /app/backend/app.js
2022-09-07T18:35:37.100129+00:00 app[web.1]: - /app/backend/server.js
2022-09-07T18:35:37.100129+00:00 app[web.1]: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
2022-09-07T18:35:37.100130+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:804:27)
2022-09-07T18:35:37.100130+00:00 app[web.1]: at Module.require (node:internal/modules/cjs/loader:1028:19)
2022-09-07T18:35:37.100131+00:00 app[web.1]: at require (node:internal/modules/cjs/helpers:102:18)
2022-09-07T18:35:37.100131+00:00 app[web.1]: at Object.<anonymous> (/app/backend/routes/product.js:3:49)
2022-09-07T18:35:37.100131+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1126:14)
2022-09-07T18:35:37.100132+00:00 app[web.1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
2022-09-07T18:35:37.100132+00:00 app[web.1]: at Module.load (node:internal/modules/cjs/loader:1004:32)
2022-09-07T18:35:37.100132+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:839:12)
2022-09-07T18:35:37.100133+00:00 app[web.1]: at Module.require (node:internal/modules/cjs/loader:1028:19) {
2022-09-07T18:35:37.100133+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
2022-09-07T18:35:37.100133+00:00 app[web.1]: requireStack: [
2022-09-07T18:35:37.100133+00:00 app[web.1]: '/app/backend/routes/product.js',
2022-09-07T18:35:37.100134+00:00 app[web.1]: '/app/backend/app.js',
2022-09-07T18:35:37.100134+00:00 app[web.1]: '/app/backend/server.js'
2022-09-07T18:35:37.100134+00:00 app[web.1]: ]
2022-09-07T18:35:37.100134+00:00 app[web.1]: }
2022-09-07T18:35:37.232083+00:00 heroku[web.1]: Process exited with status 1
2022-09-07T18:35:37.591243+00:00 heroku[web.1]: State changed from starting to crashed
2022-09-07T18:35:37.595475+00:00 heroku[web.1]: State changed from crashed to starting
2022-09-07T18:35:49.984742+00:00 heroku[web.1]: Starting process with command `node backend/server.js`
2022-09-07T18:35:52.450734+00:00 app[web.1]: node:internal/modules/cjs/loader:959
2022-09-07T18:35:52.450746+00:00 app[web.1]: throw err;
2022-09-07T18:35:52.450747+00:00 app[web.1]: ^
2022-09-07T18:35:52.450747+00:00 app[web.1]:
2022-09-07T18:35:52.450747+00:00 app[web.1]: Error: Cannot find module '../middleware/Auth'
2022-09-07T18:35:52.450747+00:00 app[web.1]: Require stack:
2022-09-07T18:35:52.450747+00:00 app[web.1]: - /app/backend/routes/product.js
2022-09-07T18:35:52.450748+00:00 app[web.1]: - /app/backend/app.js
2022-09-07T18:35:52.450748+00:00 app[web.1]: - /app/backend/server.js
2022-09-07T18:35:52.450748+00:00 app[web.1]: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
2022-09-07T18:35:52.450749+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:804:27)
2022-09-07T18:35:52.450749+00:00 app[web.1]: at Module.require (node:internal/modules/cjs/loader:1028:19)
2022-09-07T18:35:52.450750+00:00 app[web.1]: at require (node:internal/modules/cjs/helpers:102:18)
2022-09-07T18:35:52.450750+00:00 app[web.1]: at Object.<anonymous> (/app/backend/routes/product.js:3:49)
2022-09-07T18:35:52.450750+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1126:14)
2022-09-07T18:35:52.450750+00:00 app[web.1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
2022-09-07T18:35:52.450751+00:00 app[web.1]: at Module.load (node:internal/modules/cjs/loader:1004:32)
2022-09-07T18:35:52.450751+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:839:12)
2022-09-07T18:35:52.450751+00:00 app[web.1]: at Module.require (node:internal/modules/cjs/loader:1028:19) {
2022-09-07T18:35:52.450751+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
2022-09-07T18:35:52.450752+00:00 app[web.1]: requireStack: [
2022-09-07T18:35:52.450752+00:00 app[web.1]: '/app/backend/routes/product.js',
2022-09-07T18:35:52.450752+00:00 app[web.1]: '/app/backend/app.js',
2022-09-07T18:35:52.450753+00:00 app[web.1]: '/app/backend/server.js'
2022-09-07T18:35:52.450753+00:00 app[web.1]: ]
2022-09-07T18:35:52.450753+00:00 app[web.1]: }
2022-09-07T18:35:52.583649+00:00 heroku[web.1]: Process exited with status 1
2022-09-07T18:35:52.766463+00:00 heroku[web.1]: State changed from starting to crashed
2022-09-07T18:35:53.638396+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=organicecom.herokuapp.com request_id=d65dedc3-8f68-4650-ad07-0ac125842385 fwd="183.83.128.91" dyno= connect= service= status=503 bytes= protocol=https
2022-09-07T18:35:54.251861+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=organicecom.herokuapp.com request_id=18811fb6-e467-4876-8c04-1db42661601f fwd="183.83.128.91" dyno= connect= service= status=503 bytes= protocol=https
backend package.json
{
"name": "e-com",
"version": "1.0.0",
"description": "",
"main": "backend/server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node backend/server.js",
"dev": "nodemon backend/server.js",
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false && npm install --force --prefix frontend && npm run build --prefix frontend"
},
"author": "",
"license": "ISC",
"dependencies": {
"bcryptjs": "^2.4.3",
"body-parser": "^1.20.0",
"cloudinary": "^1.30.1",
"cookie-parser": "^1.4.6",
"dotenv": "^16.0.1",
"express": "^4.18.1",
"express-fileupload": "^1.4.0",
"jsonwebtoken": "^8.5.1",
"mongoose": "^6.5.2",
"nodemailer": "^6.7.8",
"nodemon": "^2.0.19",
"stripe": "^10.7.0",
"validator": "^13.7.0"
}
}
Frontend package.json
{
"name": "frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.12.4",
"@material-ui/data-grid": "^4.0.0-alpha.37",
"@material-ui/icons": "^4.11.3",
"@material-ui/lab": "^4.0.0-alpha.61",
"@stripe/react-stripe-js": "^1.10.0",
"@stripe/stripe-js": "^1.35.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^0.27.2",
"chart.js": "^3.9.1",
"country-state-city": "^3.1.1",
"overlay-navbar": "^1.2.3",
"react": "^18.2.0",
"react-alert": "^7.0.3",
"react-alert-template-basic": "^1.0.2",
"react-chartjs-2": "^4.3.1",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
"react-icons": "^4.4.0",
"react-js-pagination": "^3.0.3",
"react-material-ui-carousel": "^2.3.11",
"react-redux": "^8.0.2",
"react-router-dom": "^6.3.0",
"react-scripts": "^4.0.3",
"react-toastify": "^9.0.3",
"redux": "^4.2.0",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.4.1",
"web-vitals": "^2.1.4",
"webfontloader": "^1.6.28"
},
"scripts": {
"start": "react-scripts start ",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"proxy": "http://localhost:4000/"
}
I checked various solutions over here, none were working for me. I learned that case-sensitive things also matter. So even I changed the file which was case sensitive (../middleware/auth.js to ../middleware/Auth.js). But it is showing the same error.