I am getting the following errors when enabling certain parts of my app, in other words the app runs ok but I added some functions in the last weeks and tried to deploy the update but I started getting those error , any idea what is causing this I checked the newly added components but nothing seem to be out of order... if I comment out those components the app runs like normal.. is really hard to pin point what is going on any one had the same issue ?
// a use memo insde of hook
const convertedObject = useMemo(() => {
return Object.entries(context.icons)
.filter((e) => !arrFilter.includes(e[0]))
.map((e) => ({ item: '', key: e[0], src: e[1] }));
}, [context.options]);
2022-01-08T03:47:17.797018 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=myapp.herokuapp.com request_id=b2899edb-9996-42be-b8a5-42b3f9eeca6d fwd="46.135.6.18" dyno= connect= service= status=503 bytes= protocol=https 2022-01-08T03:47:18.126033 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=herokuapp.com request_id=ad15abf1-201b-4e5a-a029-9be71d008d0a fwd="46.135.6.18" dyno= connect= service= status=503 bytes= protocol=https
{
"name": "myapp-that-is-driving-me-crazy",
"version": "0.1.0",
"private": true,
"engines": {
"node": "14.17.4",
"npm": "6.14.14"
},
"dependencies": {
"@emotion/react": "^11.7.0",
"@emotion/styled": "^11.6.0",
"@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.60",
"@mui/material": "^5.2.1",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"@types/html2canvas": "^1.0.0",
"@types/jest": "^27.0.2",
"@types/jspdf": "^2.0.0",
"@types/node": "^16.11.6",
"@types/react": "^17.0.33",
"@types/react-dom": "^17.0.10",
"@types/react-router-dom": "^5.3.2",
"@types/uuid": "^8.3.3",
"html2canvas": "^1.3.3",
"jspdf": "^2.4.0",
"notistack": "^1.0.10",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-ga": "^3.3.0",
"react-router-dom": "^5.3.0",
"react-scripts": "4.0.3",
"typescript": "^4.4.4",
"uuid": "^8.3.2",
"web-vitals": "^1.1.2"
},
"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"
]
}
}
CodePudding user response:
I would suggest that you add package serve
.
Change your scripts to:
"scripts": {
"start": "serve -s build",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"heroku-postbuild": "npm run build"
},
If the above does not fix the issue, I suggest using a build pack such as this.