---
slug: 34054-deno-2-1-preview-local-only
published: 2025-03-07
change_type: new-feature
affected_products:
  - Edge Functions
page: https://supabase.com/changelog/34054-deno-2-1-preview-local-only
---

# Deno 2.1 Preview **local only**

You can now try [Deno 2.1](https://supabase.com/blog/supabase-edge-functions-deploy-dashboard-deno-2-1) locally with Supabase CLI. The goal of local preview is to identify any regressions or missing functionality before we upgrade hosted version to Deno 2.1.

~The hosted version still uses Deno 1.4+, and if you deploy functions written with Deno 2.1, some of the features may not work.~

UPDATE 04/09/25: hosted version is now using Deno 2.1 - https://github.com/orgs/supabase/discussions/37941

### How to try

* Install Deno 2.1 or newer version on your machine (https://docs.deno.com/runtime/getting_started/installation/) 

* Go to your Supabase project. `cd my-supabase-project`

* Open `supabase/config.toml` and set `deno_version = 2`
```toml
[edge_runtime]
deno_version = 2
```

* All your existing functions should work as before.

*To scaffold a new function as a Deno 2 project:
```bash
deno init --serve hello-world
```

* Open `supabase/config.toml` and add the following:
```
[functions.hello-world]
entrypoint = "./functions/hello-world/main.ts"
```

* Open supabase/functions/hello-world/main.ts and modify line 10 to:
```typescript
if (url.pathname === "/hello-world") {
```

* Use `npx supabase@beta functions serve --no-verify-jwt` to start the dev server.

* Visit http://localhost:54321/functions/v1/hello-world.

* To run built-in tests, `cd supabase/functions/hello-world; deno test`

Please give it a try and report any bugs and feedback.
