---
title: "Build an Astro site with Deno"
description: "Deno 2's Node and npm compatibility lets you scaffold and run an Astro project entirely with Deno tooling: `deno -A npm:create-astro@latest` to scaffold, `deno install --allow-scripts` for dependencies, and `deno task dev` to run package.json scripts."
url: "https://swe.quest/articles/build-an-astro-site-with-deno-cd90d47e8a2fd029"
canonical: "https://deno.com/blog/build-astro-with-deno"
source: "Deno"
published: "2024-10-29"
difficulty: "medium"
kind: "How-to"
reading_minutes: 4
tags: ["frontend","javascript","typescript"]
---

# Build an Astro site with Deno

A post on [Deno](https://swe.quest/sources/deno.md), published 2024-10-29, 4 min read, How-to. Original: [https://deno.com/blog/build-astro-with-deno](https://deno.com/blog/build-astro-with-deno)

## Summary

Deno 2's Node and npm compatibility lets you scaffold and run an Astro project entirely with Deno tooling: \`deno -A npm:create-astro@latest\` to scaffold, \`deno install --allow-scripts\` for dependencies, and \`deno task dev\` to run package.json scripts. The walkthrough builds a small dinosaur site with an index page generated from a JSON file and a dynamic SSR route (\`\[dinosaur\].astro\`) that reads \`Astro.params\` and redirects to 404 for unknown entries. One caveat: the Deno language server doesn't yet support \`.astro\` files, so editors may show false errors.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)

## Prerequisites

- JavaScript basics ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- npm package scripts

## Keywords

Deno, Astro, Deno 2, npm

## Related posts

- [Build and Ship Astro Sites with Deno and Deno Deploy](https://swe.quest/articles/build-and-ship-astro-sites-with-deno-and-deno-deploy-3be8936cebaf2b24.md): Deno · 2023-07-21 · Medium · 12 min read · Frontend, Serverless, Deployment, TypeScript
  Astro sites can be built with the Deno runtime and hosted on Deno Deploy in two modes.
- [Build Apps in Deno with Frameworks such as React, Vue, Express, and more.](https://swe.quest/articles/build-apps-in-deno-with-frameworks-such-as-react-vue-express-and-more-c17610b126d7b402.md): Deno · 2022-11-16 · Medium · 11 min read · JavaScript, Frontend, React, TypeScript
  Deno 1.28's npm support lets you use npm-distributed frameworks like Express, React and Vue directly via \`npm:\` specifiers.
- [Build a dinosaur runner game with Deno, pt. 1](https://swe.quest/articles/build-a-dinosaur-runner-game-with-deno-pt-1-e4d3faa91fec67fd.md): Deno · 2025-12-08 · Medium · 5 min read · JavaScript, TypeScript, Deployment, Serverless
  Part one of a series building a browser dinosaur runner game sets up a Deno project that serves static files and deploys it.
- [A Whole Website in a Single JavaScript File](https://swe.quest/articles/a-whole-website-in-a-single-javascript-file-71d46431d0988f5b.md): Deno · 2022-04-05 · Medium · 2 min read · JavaScript, Serverless, CDN & edge, Frontend, TypeScript
  A demo multi-page website fits entirely in one JavaScript file and is server-rendered on demand at the edge with Deno.
- [Deno 1.34: deno compile supports npm packages](https://swe.quest/articles/deno-1-34-deno-compile-supports-npm-packages-6066648b7bf9ee04.md): Deno · 2023-05-25 · Medium · 6 min read · JavaScript, Runtimes & VMs, Developer tools, TypeScript
  Deno 1.34 lets \`deno compile\` bundle npm packages and their dependencies into a single self-contained executable.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
