[英]My Heroku App stucks at Pending status on GitHub
First of all, hello everyone.首先,大家好。 I created a bot for Telegram that I wrote with node.js. When I want to deploy it on Heroku, it continues to deploy for a very long time (Approximately 20mins and failure).
我为我用 node.js 编写的 Telegram 创建了一个机器人。当我想在 Heroku 上部署它时,它会继续部署很长时间(大约 20 分钟并失败)。 When I want to try the bot on telegram it works fine.
当我想在电报上试用机器人时,它工作正常。 But I still see "Pending" text instead of "Success" in the Github Environments section.
但我仍然在 Github 环境部分看到“待定”文本而不是“成功”。 What can I do?
我能做什么? The logs are like this:
日志是这样的:
-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): 16.14
engines.npm (package.json): 8.5
Resolving node version 16.14...
Downloading and installing node 16.14.2...
Bootstrapping npm 8.5 (replacing 8.5.0)...
npm 8.5 installed
-----> Installing dependencies
Installing node modules
added 126 packages, and audited 127 packages in 2s
16 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
-----> Build
Running build
> pokedex-bot-telegram@1.0.0 build
> node index.js
-----> Timed out running buildpack Node.js
Terminated
! Push failed
Below is the JSON extracted from the comments from your question.以下是从您的问题的评论中提取的 JSON。 This helps with solving the issue.
这有助于解决问题。
{
"scripts": {
"start": "node index.js",
"build": "node index.js",
"dev": "nodemon index.js"
}
}
The solution is to delete the build
step.解决方案是删除
build
步骤。
This is because start
and build
are doing the exact same things, so there's no point in running it twice.这是因为
start
和build
正在做完全相同的事情,所以运行两次没有意义。
When you remove the build
part, and run it again, it should complete everything, without getting stuck on build
.当您删除
build
部分并再次运行它时,它应该会完成所有操作,而不会卡在build
上。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.