You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened?
Using Octokit to handle GitHub webhook events, running in AWS Lambda. During the Octokit constructor, a type error is thrown from what I️ have gathered is a missing dependency "is-plain-object".
Node Version: 16.14.2 + TypeScript 4.7
Bundling using Esbuild 0.14.54
Not much to show here. It happens on import for me. My import statements:
But I️ don't even get into my webhook route handler, it crashes the runtime as soon as it loads.
What did you expect to happen?
For the dependency to be present and allow the package to load.
What the problem might be
Not sure, it seems that is-plain-object is marked as a peer dep in most Octokit libraries. I️ installed it myself as well, to no avail.
The text was updated successfully, but these errors were encountered:
gr2m
added
Type: Support
Any questions, information, or general needs around the SDK or GitHub APIs
and removed
Type: Bug
Something isn't working as documented
labels
Sep 20, 2022
It sounds like a build error. I've seen people running into problems with is-plain-object before. It's not a peer dependency, it's a dependency of @octokit/request and @octokit/endpoint, so it's a sub-dependency of octokit.
So I don't think it's a problem with Octokit, but rather with the way you build your code for lambda.
I'm pretty sure this will be resolved with https://github.com/octokit/octokit-next.js where we go all in on ESM, but for the time being folks run into problems like this, unfortunately. I hope you can figure it out, please share what worked for you when you do
What happened?
Using Octokit to handle GitHub webhook events, running in AWS Lambda. During the Octokit constructor, a type error is thrown from what I️ have gathered is a missing dependency "is-plain-object".
Node Version: 16.14.2 + TypeScript 4.7
Bundling using Esbuild 0.14.54
Not much to show here. It happens on import for me. My import statements:
But I️ don't even get into my webhook route handler, it crashes the runtime as soon as it loads.
What did you expect to happen?
For the dependency to be present and allow the package to load.
What the problem might be
Not sure, it seems that
is-plain-object
is marked as a peer dep in most Octokit libraries. I️ installed it myself as well, to no avail.The text was updated successfully, but these errors were encountered: