Heroku Build成功用于我的React应用程序,但是当我转到网站时,出现“应用程序错误”

如何解决Heroku Build成功用于我的React应用程序,但是当我转到网站时,出现“应用程序错误”

将代码从主服务器推送到heroku之后,我可以看到构建成功,但是当我们实际转到部署成功构建的站点时,应用程序会引发错误。任何机构都可以帮助我知道为什么出现应用程序错误。

当我拖尾日志时,我可以在下面找到-

2020-10-11T18:43:41.000000+00:00 app[api]: Build succeeded
2020-10-11T18:43:42.873865+00:00 heroku[web.1]: Starting process with command `npm start`
2020-10-11T18:43:46.006173+00:00 app[web.1]: 
2020-10-11T18:43:46.006198+00:00 app[web.1]: > myportfoliosite@0.1.0 start /app
2020-10-11T18:43:46.006198+00:00 app[web.1]: > react-scripts start
2020-10-11T18:43:46.006199+00:00 app[web.1]: 
2020-10-11T18:43:49.419055+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.18.22.138/
2020-10-11T18:43:49.419568+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-10-11T18:43:49.419684+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-10-11T18:43:49.419841+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-10-11T18:43:49.420118+00:00 app[web.1]: Starting the development server...
2020-10-11T18:43:49.420119+00:00 app[web.1]: 
2020-10-11T18:43:49.507004+00:00 heroku[web.1]: Process exited with status 0
2020-10-11T18:43:49.548170+00:00 heroku[web.1]: State changed from starting to crashed
2020-10-11T18:43:49.550937+00:00 heroku[web.1]: State changed from crashed to starting
2020-10-11T18:44:01.341243+00:00 heroku[web.1]: Starting process with command `npm start`
2020-10-11T18:44:04.397476+00:00 app[web.1]: 
2020-10-11T18:44:04.397511+00:00 app[web.1]: > myportfoliosite@0.1.0 start /app
2020-10-11T18:44:04.397511+00:00 app[web.1]: > react-scripts start
2020-10-11T18:44:04.397511+00:00 app[web.1]: 
2020-10-11T18:44:06.978790+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.17.146.242/
2020-10-11T18:44:06.979411+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-10-11T18:44:06.979554+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-10-11T18:44:06.979678+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-10-11T18:44:06.979966+00:00 app[web.1]: Starting the development server...
2020-10-11T18:44:06.979968+00:00 app[web.1]: 
2020-10-11T18:44:07.118043+00:00 heroku[web.1]: Process exited with status 0
2020-10-11T18:44:07.163548+00:00 heroku[web.1]: State changed from starting to crashed
2020-10-11T18:44:09.831089+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=meghraj-portfolio.herokuapp.com request_id=92057baf-e407-4ebe-be37-fc750bd83a41 fwd="152.57.99.116" dyno= connect= service= status=503 bytes= protocol=https
2020-10-11T18:44:10.368807+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=meghraj-portfolio.herokuapp.com request_id=92f4eae5-55f0-4beb-a7d7-0aac78a9eb1d fwd="152.57.99.116" dyno= connect= service= status=503 bytes= protocol=https

不确定是什么原因导致应用程序崩溃。 以下是构建日志-

Counting objects: 100% (7/7),done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4),done.
Writing objects: 100% (4/4),462 bytes | 462.00 KiB/s,done.
Total 4 (delta 3),reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Node.js app detected
remote:        
remote: -----> Creating runtime environment
remote:        
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        USE_YARN_CACHE=true
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote:        NODE_VERBOSE=false
remote:        
remote: -----> Installing binaries
remote:        engines.node (package.json):  unspecified
remote:        engines.npm (package.json):   unspecified (use default)
remote:        engines.yarn (package.json):  unspecified (use default)
remote:        
remote:        Resolving node version 12.x...
remote:        Downloading and installing node 12.19.0...
remote:        Using default npm version: 6.14.8
remote:        Resolving yarn version 1.22.x...
remote:        Downloading and installing yarn (1.22.5)
remote:        Installed yarn 1.22.5
remote:        
remote: -----> Restoring cache
remote:        - yarn cache
remote:        
remote: -----> Installing dependencies
remote:        Installing node modules (yarn.lock)
remote:        yarn install v1.22.5
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        info fsevents@2.1.2: The platform "linux" is incompatible with this module.
remote:        info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
remote:        info fsevents@1.2.13: The platform "linux" is incompatible with this module.
remote:        info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
remote:        info fsevents@2.1.3: The platform "linux" is incompatible with this module.
remote:        info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
remote:        [3/4] Linking dependencies...
remote:        warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
remote:        [4/4] Building fresh packages...
remote:        Done in 22.22s.
remote:        
remote: -----> Build
remote:        Running build (yarn)
remote:        yarn run v1.22.5
remote:        $ react-scripts build
remote:        Creating an optimized production build...
remote:        Compiled successfully.
remote:        
remote:        File sizes after gzip:
remote:        
remote:          74.78 KB  build/static/js/2.543da256.chunk.js
remote:          17.95 KB  build/static/css/2.cd1c2086.chunk.css
remote:          4.94 KB   build/static/js/main.ea12f483.chunk.js
remote:          774 B     build/static/js/runtime-main.aa4df6ff.js
remote:          648 B     build/static/css/main.0c9e3b3d.chunk.css
remote:        
remote:        The project was built assuming it is hosted at /.
remote:        You can control this with the homepage field in your package.json.
remote:        
remote:        The build folder is ready to be deployed.
remote:        You may serve it with a static server:
remote:        
remote:          yarn global add serve
remote:          serve -s build
remote:        
remote:        Find out more about deployment here:
remote:        
remote:          bit.ly/CRA-deploy
remote:        
remote:        Done in 24.62s.
remote:        
remote: -----> Pruning devDependencies
remote:        yarn install v1.22.5
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        info fsevents@2.1.2: The platform "linux" is incompatible with this module.
remote:        info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
remote:        info fsevents@1.2.13: The platform "linux" is incompatible with this module.
remote:        info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
remote:        info fsevents@2.1.3: The platform "linux" is incompatible with this module.
remote:        info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
remote:        [3/4] Linking dependencies...
remote:        warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
remote:        [4/4] Building fresh packages...
remote:        warning Ignored scripts due to flag.
remote:        Done in 9.62s.
remote:        
remote: -----> Caching build
remote:        - yarn cache
remote:        
remote: -----> Build succeeded!
remote:  !     Unmet dependencies don't fail yarn install but may cause runtime issues
remote:        https://github.com/npm/npm/issues/7494
remote: 
remote: -----> Discovering process types
remote:        Procfile declares types     -> (none)
remote:        Default types for buildpack -> web
remote: 
remote: -----> Compressing...
remote:        Done: 83.8M
remote: -----> Launching...
remote:        Released v6
remote:        https://meghraj-portfolio.herokuapp.com/ deployed to Heroku
remote: 
remote: Verifying deploy... done.
To https://git.heroku.com/meghraj-portfolio.git
   2564ea5..399ff3f  master -> master

任何人都可以帮助我了解即使构建成功后导致应用程序在heroku上崩溃的原因。我无法从heroku cli的日志中找出任何东西。 如果我在本地运行相同,则工作正常。 任何帮助将不胜感激。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 <select id="xxx"> SELECT di.id, di.name, di.work_type, di.updated... <where> <if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 <property name="dynamic.classpath" value="tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams['font.sans-serif'] = ['SimHei'] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -> systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping("/hires") public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate<String
使用vite构建项目报错 C:\Users\ychen\work>npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-