npx create-probot-app my-first-app我正在尝试使用链接中的命令安装 probot.github 应用程序: https://probot.github.io/docs/development/。我使用的是最新的 Node v19.3.0 和 npm 版本 9.2.0。但该应用程序尚未创建,并且失败并出现错误
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
/Users/user1/.npm/_npx/ac7da0f8d6e6b5c7/node_modules/npm/index.js:4
throw new Error('The programmatic API was removed in npm v8.0.0')
^
Error: The programmatic API was removed in npm v8.0.0
at Object.<anonymous> (/Users/user1/.npm/_npx/ac7da0f8d6e6b5c7/node_modules/npm/index.js:4:9)
at Module._compile (node:internal/modules/cjs/loader:1218:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
at Module.load (node:internal/modules/cjs/loader:1081:32)
at Module._load (node:internal/modules/cjs/loader:922:12)
at Module.require (node:internal/modules/cjs/loader:1105:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/Users/user1/.npm/_npx/ac7da0f8d6e6b5c7/node_modules/create-probot-app/bin/helpers/run-npm.js:7:31)
at Module._compile (node:internal/modules/cjs/loader:1218:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
at …Run Code Online (Sandbox Code Playgroud) 在使用 GitHub 的 Probot 应用程序时,我遇到了身份验证问题。当我使用 npm start 运行应用程序时,我会得到
github: Github request: GET /app/installations - 404 Not Found
和
ERROR probot: {"message":"Integration not found", "documentation_url": "https://developer.github.com/v3"}
后来我发现我遇到这个问题的原因是因为我使用的是 GitHub Enterprise 帐户并且需要向我的 .env 文件添加一个额外的变量:
GHE_HOST=github.your_company.com
重新启动我的应用程序后,我不再遇到这些问题。
我正在尝试使用Probot Framework构建GitHub应用程序。
这是file的内容index.js:
module.exports = (robot) => {
robot.log('Yay, the app was loaded!');
robot.on('*', async context => {
robot.log('Some event occured!');
});
}
Run Code Online (Sandbox Code Playgroud)
但是,当我运行此应用程序时,将其安装在存储库中后,我收到此错误:
03:38:34.831Z ERROR probot: signature does not match event payload and secret
Error: signature does not match event payload and secret
at verifyAndReceive (/mnt/e/GSoC/test/test/node_modules/@octokit/webhooks/middleware/verify-and-receive.js:9:19)
at IncomingMessage.request.on (/mnt/e/GSoC/test/test/node_modules/@octokit/webhooks/middleware/middleware.js:53:5)
at emitNone (events.js:106:13)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
Run Code Online (Sandbox Code Playgroud)
这个错误背后的问题是什么?我该如何解决这个问题?
I'm trying to deploy a GitHub Probot App (NodeJS application) to my webserver running Plesk 18.0.27 U1 with the NodeJS Extension 1.3.6-117. When running the probot app on my local machine, the app starts just fine and is accessible via localhost.
Plesk is apparently using the Phusion Passenger application server to serve NodeJS apps.
When accessing the deployed website, I get the following errror:
Screenshot: Passenger problem location
And in /var/log/nginx/error.log:
[ E 2020-05-30 10:06:31.7393 21506/Th age/Cor/App/Implementation.cpp:221 ]: …Run Code Online (Sandbox Code Playgroud) probot ×4
github ×2
node.js ×2
github-api ×1
github-app ×1
integration ×1
javascript ×1
nginx ×1
npm ×1
passenger ×1
plesk ×1