#Cannot find name 'Deno'.
4 messages · Page 1 of 1 (latest)
Hi @tranquil socket. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
To use Deno with Astro, you need to add the Deno adapter to your Astro project. You can do this by running the following command in your terminal:
npx astro add deno
This command will install the Deno adapter and make the necessary changes to your astro.config.mjs file. If you prefer to install the adapter manually, you can do so by running:
npm install @astrojs/deno
Then, you need to update your astro.config.mjs file with the following changes:
import { defineConfig } from 'astro/config';
import deno from '@astrojs/deno';
export default defineConfig({
output: 'server',
adapter: deno(),
});
Please note that Astro doesn't officially support Deno in dev mode at the moment, and there might be some compatibility issues with certain features or integrations.
Sources:
- Deploy your Astro Site to Deno - Project Configuration (https://docs.astro.build/en/guides/deploy/deno#project-configuration)
- Github Issue: Does react integration work with deno? (https://github.com/withastro/astro/issues/7344)
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@tranquil socket kapa.ai is still learning and improving, please let us know how it did by reacting below