nitro icon indicating copy to clipboard operation
nitro copied to clipboard

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

Open tolu opened this issue 2 months ago • 1 comments

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?

🫶

tolu avatar Oct 13 '25 20:10 tolu

Thanks for creating the issue and explaining. I think for Nitro v3, we can deprecate two old presets and make a new one shared for server and EA

/cc @lucacasonato

pi0 avatar Oct 14 '25 07:10 pi0