Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

globalThis.FetchEvent is not defined #554

Open
jamesarosen opened this issue Jun 8, 2023 · 0 comments
Open

globalThis.FetchEvent is not defined #554

jamesarosen opened this issue Jun 8, 2023 · 0 comments

Comments

@jamesarosen
Copy link

I'm trying to use @fastly/js-compute-runtime with Hono, a framework for building Edge applications.

When I try to access honoContext.event, I get an exception:

Log: (new ReferenceError("FetchEvent is not defined", "", 153))
l@:185:130
722/s/</<@:87:52

That's because Hono tries to check

if (this._exCtx instanceof FetchEvent) {

That is, it expects globalThis.FetchEvent to (a) exist and (b) be the constructor for the FetchEvent instance that triggered the request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant