Собрал приложение с помощью React Create App, использовал redux. На локальном хостинге все работает, на github.io тоже приложение отлично работает
https://nickeny.github.io/comments-on-React/
Но когда я пытаюсь собрать приложение в Heroku, выдается ошибка TypeError: Cannot read property 'addComment' of undefined, будто само приложение написано неверно.
package.json:
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.6",
"@testing-library/react": "^11.2.0",
"@testing-library/user-event": "^12.2.2",
"express": "^4.17.1",
"path": "^0.12.7",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-redux": "^7.2.2",
"react-scripts": "4.0.0",
"redux": "^4.0.5",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "node server.js",
"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"
]
},
"description": "This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).",
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/nickeny/main.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/nickeny/main/issues"
},
"homepage": "./"
}