简体   繁体   English

如何修复procfile不显示?

[英]How to fix procfile not showing?

I am trying to make my Discord bot, located here on Github, but my settings from my Procfile are not showing up. 我正在尝试使我的Discord机器人位于 Github上,但Procfile中的设置未显示。

I have tried checking the file is only procfile , remaking the file, changing the code. 我试过检查文件是否只有procfile ,重新制作文件,更改代码。

worker node bot.js

I expect Heroku to run node bot.js but I get just the default npm start , No worker stuff. 我希望Heroku运行node bot.js但是我只有默认的npm start ,没有任何工作人员。

  1. Make sure the file is called Procfile , with a capital P, not procfile . 确保文件名为Procfile ,大写P而不是procfile You use both versions in your question but only Procfile is correct. 您在问题中使用两个版本,但只有Procfile是正确的。

  2. Add a colon after the process type: 在流程类型之后添加一个冒号:

     worker: node bot.js 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM