Heroku部署卡在构建中



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

package.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 */

对于那些可能仍然到达这里的人,有一个选项来清理Heroku构建缓存,如下所示:

假设您已经安装了heroku命令行:

heroku plugins:install heroku-builds

然后heroku builds:cache:purge -a example-app

之后,在下次部署时,将重新构建构建缓存。

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