---
number: 36814
slug: 36814-deno-2-1-preview-hosted-environment
published: 2025-07-01
discussion: https://github.com/orgs/supabase/discussions/36814
labels:
  - edge functions
page: https://supabase.com/changelog/36814-deno-2-1-preview-hosted-environment
---

# Deno 2.1 Preview - Hosted Environment

A couple of months ago, we started migrating our Edge Functions platform to use [Deno 2.1](https://deno.com/blog/v2.0). Deno 2 bridges the gap between Node and Deno by supporting Node's built-in APIs, npm modules, and `package.json`. This would make it easy to migrate existing Node apps to run in the Edge Functions platform.

Previously, we [announced](https://github.com/orgs/supabase/discussions/34054) that you can start testing Deno 2.1 locally for your Edge Functions. Thanks to everyone who tried and gave us feedback.

Today, we give you the option to preview Deno 2.1 on our hosted platform. You should try running your existing Edge Functions with Deno 2.1 and report any bugs/issues.

You can first run `deno lint` locally on your Edge Functions code with [no-deprecated-deno-api](https://docs.deno.com/lint/rules/no-deprecated-deno-api/) rule to find any breaking changes in Deno 2.

Once you have updated your functions, you can test them in our hosted platform as follows:

### How to test for Deno 2 compatibility

There are two ways to force your functions to run on the Deno 2 preview cluster.
* Add query parameter `forceDenoVersion=2` to your function requests

 ```
https://project-ref.supabase.co/functions/v1/hello-world?forceDenoVersion=2
````

* Add `x-deno-version: 2` header in requests

```
curl --request POST \
  --url https://project-ref.supabase.co/functions/v1/hello-world \
  --header 'content-type: application/json' \
  --header 'x-deno-version: 2' \
  --data '{
  "name": "test"
}
```

**Note**: Deno 2 Preview cluster traffic will be served from `us-east-2` region. You don't need to set the region explicitly.

Also, in the next couple of days, we will notify projects currently using deprecated APIs via email to update their functions to use Deno 2.

### When are we fully rolling out Deno 2.1?

Based on the feedback and issues we discover in this preview, we will decide the timeline on making Deno 2.1 the default runtime in our hosted platform. Current ETA is within 3-6 weeks.
