node-cluster preset not working
Environment
when defining the preset as node-cluster. The following error is encountered when running build.
error during build: Error: Cannot resolve module "./runtime/node-server" (from: /Users/MHuggins/github/glg/ts-start-poc/node_modules/.pnpm/[email protected][email protected]_@[email protected][email protected][email protected]_/node_modules/nitro/dist/presets.mjs)
Reproduction
When running build with the preset set to node-cluster the build fails.
I'm using vite and tanstack-start.
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import { defineConfig } from "vite";
import tsConfigPaths from "vite-tsconfig-paths";
import viteReact from "@vitejs/plugin-react";
import { nitro } from "nitro/vite";
export default defineConfig({
server: {
port: 3000,
},
build: {
sourcemap: "hidden",
},
ssr: {
noExternal: ["@mui/*"],
},
plugins: [
tsConfigPaths({
projects: ["./tsconfig.json"],
}),
tanstackStart({
spa: {
enabled: true,
},
}),
nitro(
// nitro config goes here, e.g.
{ config: { preset: "node-cluster" } },
),
viteReact(),
],
});
Describe the bug
Build fails
Additional context
No response
Logs
Can you try latest nightly with "nitro": "npm:nitro-nightly" ?
after swapping to nightly
Thanks for report. Should be fixed by #3762