nitrojs / nitrojs/nitro

Docs: Improve deno deploy (EA) docs for linked github repos

Open Beginner friendly
#3,652 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tanstack v3
Dominant language
TypeScript
Stars
11.2k
Forks
899
Avg merge
2d 24m
Merged PRs (30d)
40

Description

First of all I'd be glad to help out with this! Just firstly wanted to check if it was something you would appreciate.

I spent the weekend trying to get a TanStackStart app (using nitro) deployed to Deno Deploy (early access).

I know I'm talking about Deno Deploy EA - but dash.deno.com now redirects to console.deno.com (in incognito mode) so I feel like that is the general experience now 😊

ℹ️ Specifically I wanted to deploy using a linked github repo only, no custom builds or gh-actions

Image

At first I tried using nitro-nightly/vite but ran into a node compat issue in Deno that I filed; that is fixed and already out in Deno Canary 🙌 just have to wait for the stable release now.

Then I switched to the temporary compatibility plugin @tanstack/nitro-v2-vite-plugin but could not get my head around why I could not get either deno_deploy or deno presets to work with static file serving (500 errors).

The build config settings:

Image

The same issue was easy to reproduce locally in that static file serving only works if I started the app from the .output-folder. And Deno Deploy has no CWD/root settings in the web console (like deployctl has).

I got it working by selecting the Nuxt Framework Preset (on Deploy) and removing the custom nitro-preset. My assumption then was that the Nuxt-preset actually somehow set the CWD to .output.

Finally Luca instructed me that the correct preset to use actually is deno_server - a bit confusing naming-wise 😅.

That nitro-preset also produce a .output/server/index.mjs that runs perfectly without having to set a custom CWD 🥳.

All of this to say that, I think this is the simplest way to automatically deploy nitro-apps to Deno Deploy via git, with minimal config. And it is missing from the deno deploy provider docs 🙏 (and the preset naming is a bit confusing)

Would you consider a PR for this scenario?

🫶

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Deno Deploy provider documentation and the linked-GitHub-repository setup described in the issue. Document the minimal Nitro configuration using the deno_server preset, explain the confusing preset naming, and make the linked-repository deployment path reproducible without custom builds or GitHub Actions.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, github, typescript
Domain
cloud, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.