-
Notifications
You must be signed in to change notification settings - Fork 414
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior π―
When using the "@solidjs/vite-plugin-nitro-2" plugin Cloudflare presets (like cloudflare-module) don't generate a functioning application.
They generate an application that when run via npx wrangler dev returns a 500 response:

Note that using directly the nitro plugin from "nitro/vite" does instead.
Expected behavior π€
The "@solidjs/vite-plugin-nitro-2" plugin would produce valid Cloudflare Workers in the same way the official nitro plugin does. (especially since the "@solidjs/vite-plugin-nitro-2"plugin does accept apreset` in its options parameter).
Steps to reproduce πΉ
Steps:
- Create a new solid-start app via
npm create solid, select:
(the options not listed are not relevant)- β What type of project would you like to create?
β SolidStart - β Which version of SolidStart?
β v2 (pre-release, recommended) - β Which template would you like to use?
β basic
- β What type of project would you like to create?
- cd into the project's directory, run
npm i - in the
/vite.config.tsfile add thecloudflare-modulepreset to thenitroplugin:import { defineConfig } from "vite"; import { nitroV2Plugin as nitro } from "@solidjs/vite-plugin-nitro-2"; import { solidStart } from "@solidjs/start/config"; export default defineConfig({ plugins: [solidStart(), - nitro() + nitro({ preset: 'cloudflare-module' }) ] }); - run
npm run build - run
npx wrangler dev .output/server/index.mjs --assets .output/public(as suggested by thenpm run buildoutput) - Try visiting the page and it won't work
Context π¦
At Cloudflare we have the create-cloudflare CLI npm create cloudflare which scaffolds projects for users. It supports most frameworks including solidStart, however we noticed that recently, after solid switched to the @solidjs/vite-plugin-nitro-2 plugin, the solidStart integration of create-cloudflare broke and we would love it if we could fix it. I'm happy to try to help with whatever fix might be necessary here π (I don't have a lot of context and I don't really know what the switch was made from the official nitro plugin to the solid specific one).
But note that this issue is valid regardless on create-cloudflare. As far as I can tell, the use of the new solid specific plugin prevents the deployment of any solidStart applications to Cloudflare.
Your environment π
System:
OS: macOS 26.3.1
CPU: (10) arm64 Apple M1 Pro
Binaries:
Node: 22.21.1
Yarn: 1.22.22
npm: 10.9.4
pnpm: 10.30.2
npmPackages:
@solidjs/start: 2.0.0-alpha.2
@solidjs/vite-plugin-nitro-2: 0.1.0
(nitro: 3.0.260311-beta)