S
SolidJS•4mo ago
iocalebs

`vinxi start` fails with "Cannot find module" error with Vercel preset

Repro steps: 1. pnpm create solid with all default options 2. cd solid-project 3. pnpm update 4. Update app.config.ts to:
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
server: {
preset: "vercel",
}
});
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
server: {
preset: "vercel",
}
});
5. pnpm build 6. pnpm start On my Mac this errors out with "Cannot find module". Something about not finding .output/server/index.mjs, which isn't generated when Vercel is the preset. vinxi dev works fine. Deployments to Vercel are working fine. Just can't seem to run vinxi start which is a bit of a problem for what I'm trying to accomplish.
4 Replies
exercise
exercise•4mo ago
because vinxi start is looking for the node build, which doesn't exist since you're targeting vercel if you use preset: "node-server" it will work
iocalebs
iocalebsOP•4mo ago
Ok but I still need to deploy to Vercel 😅 This is fine as a workaround for what I need but I don't know that it really solves the underlying problem.pnpm start should work regardless of what the server preset is, no?
exercise
exercise•4mo ago
it only works when you have a node build or bun or deno, etc.
iocalebs
iocalebsOP•4mo ago
I see

Did you find this page helpful?