I'm using nodejs + reactjs + express + mongodb
Deployed my backend on another server and its works perfectly fine.
But when i accessing frontend it showing "H10" error and when i run this same project using
heroku local
its works perfectly fine.
My package.json
{
"name": "ecommerce",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"braintree-web-drop-in-react": "^1.1.1",
"concurrently": "^5.2.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.1",
"react-stripe-checkout": "^2.6.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"heroku-postbuild": "npm run build"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": "10.x",
"npm": "6.x"
}
}
Logs that i get:
2020-04-25T18:04:45.413902+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ecommerce-frontend-dweep.herokuapp.com request_id=0d7f7627-3a3e-4a79-8221-b09f89fb49d0 fwd="103.240.77.140" dyno= connect= service= status=503 bytes= protocol=https
2020-04-25T18:04:46.267420+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ecommerce-frontend-dweep.herokuapp.com request_id=30e4c07f-fd30-4210-8158-dabbd7d196f9 fwd="103.240.77.140" dyno= connect= service= status=503 bytes= protocol=https
Also run heroku run node console
Output (incase it required):
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module '/app/console'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
Already tried solution of First Heroku deploy failed `error code=H10` but it didn't work