Probot receive errors with "TypeError: appFn is not a function"
See original GitHub issueBug Report
Current Behavior
I’m testing locally with the node_modules/.bin/probot receive -e pull_request ...
command.
I get an TypeError: appFn is not a function
.
The reason might because I’ve set up my main function as follows (since this project deploys to serverless):
export function handler(app: Application) {
app.on(['pull_request.opened'], async context => {...}
};
probot run
npm start
works just fine. This only happens when I call probot receive. Any tips here would be appreciated. Thank you!
Environment
- Probot version(s): “version”: “10.9.0”
- Node/npm version: “>= 12.18.2”
- OS: OS 10.15.6
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Refactoring probot event functions into seperate file causes ...
Refactoring probot event functions into seperate file causes error: TypeError: handler is not a function · Subscribe to RSS.
Read more >Build your own Probot
We built Smee.io specifically for Probot, to receive webhook events ... This lets you focus on your app code, and not care what...
Read more >Testing - Probot
It is frustrating to constantly create real GitHub events in order to test an app. Redelivering webhooks is possible and can be accessed...
Read more >Android apps build failing - Build issue
TypeError : /tmp/596948-android-252041/src/entry/index.android.ts: isTSSatisfiesExpression is not a function at Object.
Read more >Creating a Github Bot to Automatically Verify Snapshot ...
Github provides a framework to create apps in Node.js — Probot. ... If the bot did not publish a comment (there should be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you try to export the function as default?
Just to provide a possible solution for people who encounter same issue - I was able to solve the problem by simply exporting default anonymous function, e.g.: