【问题标题】:Probot version 7.2 is not starting my appProbot 7.2 版没有启动我的应用程序
【发布时间】:2018-10-09 08:50:27
【问题描述】:

使用probot 7.2,如果我创建一个简单的index.js 喜欢

module.exports = app => {
 app.log('YYYYYYYEEEEEEEEEEEAAAAAAAAAAAHHHHHHHHH it is working!!!!')
}

此导出不起作用,因为当我运行应用程序时,我从未看到我的日志消息。 npm run dev 给那些日志:

> test@1.0.0 dev /tmp/test
> nodemon

[nodemon] 1.18.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: .env *.*
[nodemon] starting `npm start`

> test@1.0.0 start /tmp/test
> probot run ./index.js

08:46:15.243Z  INFO probot: Listening on http://localhost:3000
08:46:15.817Z  INFO probot:

  Welcome to Probot! Go to http://localhost:3000 to get started.

如果我将版本降级到 7.1 就可以了。

有人知道 7.2 版本是否有一些(以及哪些)变化?

【问题讨论】:

    标签: github probot


    【解决方案1】:

    刚刚发现原因,所以我自己回答:

    在 7.1 版本中,当您启动 probot 时没有所需的 env 变量时会出现错误。

    在 7.2 上没有显示这些错误。您需要正确设置 env 变量,否则它只会启动,但会默默地加载您的设置。

    env(或.env文件)必须定义:

    APP_ID=...
    WEBHOOK_PROXY_URL=...
    LOG_LEVEL=...
    WEBHOOK_SECRET=...
    PRIVATE_KEY=...
    

    定义了完整的可能环境变量in the documentation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-04-03
      • 1970-01-01
      • 2020-09-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-20
      相关资源
      最近更新 更多