应用错误:在Heroku上部署react js项目

时间:2020-11-06 10:31:40

标签: reactjs heroku web-deployment

我遵循https://dev.to/smithmanny/deploy-your-react-app-to-heroku-2b6f中的教程。一切工作正常,我通过添加名为webpack-cli的新对象完成了package.json的配置,但是当我打开应用程序时,它显示应用程序错误,并且运行此命令engines,并在下面显示错误。

heroku logs --tail

这是我的package.json

2020-11-06T10:18:19.369209+00:00 heroku[web.1]: State changed from starting to crashed
2020-11-06T10:20:14.005978+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=immense-beyond-93095.herokuapp.com request_id=6563476d-6eb0-47ad-8c85-39d457e22a20 fwd="110.54.238.117" dyno= connect= service= status=503 bytes= protocol=https
=immense-beyond-93095.herokuapp.com request_id=6597bf5d-2d7f-477f-a893-aef0cb946619 fwd="110.54.238.117" dyno= connect= s=immense-beyond-93095.herokuapp.com reqervice= status=503 bytes= protocol=https 

这是站点{ "name": "uncle-edge-website", "version": "1.0.0", "description": "Uncle Edge Unli Wings", "private": true, "main": "src/index.js", "engines": { "npm": "6.14.4", "node": "12.16.2" }, "dependencies": { "@material-ui/core": "4.10.0", "@material-ui/icons": "4.9.1", "classnames": "2.2.6", "history": "4.10.1", "moment": "2.26.0", "node-sass": "4.14.1", "nouislider": "14.5.0", "prop-types": "15.7.2", "react": "16.13.1", "react-datetime": "2.16.3", "react-dom": "16.13.1", "react-router-dom": "5.2.0", "react-scripts": "3.4.1", "react-slick": "0.26.1", "react-swipeable-views": "0.13.9" }, "devDependencies": { "@babel/cli": "7.10.1", "@babel/plugin-proposal-class-properties": "7.10.1", "@babel/preset-env": "7.10.1", "@babel/preset-react": "7.10.1", "eslint-config-prettier": "6.11.0", "eslint-plugin-prettier": "3.1.3", "eslint-plugin-react": "7.20.0", "gulp": "4.0.2", "gulp-append-prepend": "1.0.8", "prettier": "2.0.5" }, "optionalDependencies": { "typescript": "3.9.3" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build && gulp licenses", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject", "lint:check": "eslint . --ext=js,jsx; exit 0", "lint:fix": "eslint . --ext=js,jsx --fix; exit 0", "install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start", "build-package-css": "node-sass src/assets/scss/material-kit-react.scss dist/material-kit-react.css", "build-package": "npm run build-package-css && babel src --out-dir dist", "compile-sass": "node-sass src/assets/scss/material-kit-react.scss src/assets/css/material-kit-react.css", "minify-sass": "node-sass src/assets/scss/material-kit-react.scss src/assets/css/material-kit-react.min.css --output-style compressed", "map-sass": "node-sass src/assets/scss/material-kit-react.scss src/assets/css/material-kit-react.css --source-map true" }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [] } }

0 个答案:

没有答案