Skip to content
Back

Deno function execution error

  • 0
  • Self Hosted
  • Functions
Karl
4 Mar, 2025, 08:57

I deployed my function with deno 2.0

when i hit execute i get the following error "TypeError: Cannot read properties of undefined (reading 'constructor') at execute (file:///usr/local/server/src/action.ts:170:38) at async action (file:///usr/local/server/src/action.ts:191:7) at async file:///usr/local/server/src/server.ts:19:5 at async dispatch (https://deno.land/x/oak@v17.0.0/middleware.ts:90:7) at async Application.#handleRequest (https://deno.land/x/oak@v17.0.0/application.ts:605:9)"

But when input my command i run deno locally with it works with "deno run --allow-net --allow-env --env-file index.ts" If i put this as build command for my deno environment i can see it also working during the building process but what is happening when i click execute? There must be something im missing.

TL;DR
Developers experiencing "Cannot read properties of undefined" error when executing Deno function deployed with version 2.0. Running the function locally works fine with "deno run --allow-net --allow-env --env-file index.ts" command. Consider setting the same build command in Deno environment for proper execution.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more