首页 > 解决方案 > Heroku部署卡在构建中

问题描述

我想将 MERN 堆栈应用程序部署到 heroku。当我运行时一切都很好,heroku local但是当我想在构建过程中部署它并继续运行构建时。日志中没有错误。

包.json

  "scripts": {
"start": "cd server && node server.js",
"client": "cd client && npm start",
"server": "nodemon server.js",
"build": "cd client && npm install && npm run build",
"dev": "concurrently \"npm run server\" \"npm run client\""
},

heroku 日志

2021-09-22T09:30:16.363135+00:00 app[api]: Release v1 created by user /* my email here */
2021-09-22T09:30:16.363135+00:00 app[api]: Initial release by user /* my email here */
2021-09-22T09:30:16.609550+00:00 app[api]: Enable Logplex by user /* my email here */
2021-09-22T09:30:16.609550+00:00 app[api]: Release v2 created by user /* my email here */
2021-09-22T09:32:37.000000+00:00 app[api]: Build started by user /* my email here */

标签: herokudeployment

解决方案


因此,在用头敲击键盘几个小时后,我删除了.git文件夹并再次初始化了 git 并进行了部署,如果这是您遇到的唯一错误,这应该对您有用。


推荐阅读