Cannot build for Vercel

For context So far I'm not satisfied with Solid Start because I wasn't able to deploy the app at least anywhere (I tried Vercel, Netlify and Cloudflare). But Vercel is my main target so this question is about deploying to Vercel specifically. Also I haven't really seen anyone to have the same problem as I do. How to reproduce 1. Create a new Solid Start project
npm init solid@latest
npm init solid@latest
2. Choose any template (I chose hackernews) 3. Edit your app.config.ts as follows:
import { defineConfig } from "@solidjs/start/config";

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

export default defineConfig({
server: {
preset: "vercel-edge",
},
});
4. Run npm run build Error
ERROR Cannot read properties of undefined (reading 'split')
at /F:/repos/hackernews/node_modules/@rollup/plugin-inject/dist/es/index.js:74:74
at Map.forEach (<anonymous>)
at inject (/F:/repos/hackernews/node_modules/@rollup/plugin-inject/dist/es/index.js:71:16)
at getRollupConfig (/F:/repos/hackernews/node_modules/nitropack/dist/nitro.mjs:2036:29)
at build (/F:/repos/hackernews/node_modules/nitropack/dist/nitro.mjs:2349:24)
at createBuild (/F:/repos/hackernews/node_modules/vinxi/lib/build.js:306:8)
at async Object.run (/F:/repos/hackernews/node_modules/vinxi/bin/cli.mjs:227:5)
at async runCommand (/F:/repos/hackernews/node_modules/citty/dist/index.mjs:316:16)
at async runCommand (/F:/repos/hackernews/node_modules/citty/dist/index.mjs:307:11)
at async runMain (/F:/repos/hackernews/node_modules/citty/dist/index.mjs:445:7)



ERROR Cannot read properties of undefined (reading 'split')
ERROR Cannot read properties of undefined (reading 'split')
at /F:/repos/hackernews/node_modules/@rollup/plugin-inject/dist/es/index.js:74:74
at Map.forEach (<anonymous>)
at inject (/F:/repos/hackernews/node_modules/@rollup/plugin-inject/dist/es/index.js:71:16)
at getRollupConfig (/F:/repos/hackernews/node_modules/nitropack/dist/nitro.mjs:2036:29)
at build (/F:/repos/hackernews/node_modules/nitropack/dist/nitro.mjs:2349:24)
at createBuild (/F:/repos/hackernews/node_modules/vinxi/lib/build.js:306:8)
at async Object.run (/F:/repos/hackernews/node_modules/vinxi/bin/cli.mjs:227:5)
at async runCommand (/F:/repos/hackernews/node_modules/citty/dist/index.mjs:316:16)
at async runCommand (/F:/repos/hackernews/node_modules/citty/dist/index.mjs:307:11)
at async runMain (/F:/repos/hackernews/node_modules/citty/dist/index.mjs:445:7)



ERROR Cannot read properties of undefined (reading 'split')
32 Replies
Brendonovich
Brendonovich•2mo ago
not sure what the error is at first glance, but have you tried vercel instead of vercel-edge?
deminearchiver
deminearchiver•2mo ago
Using vercel gives an error after deploying to vercel.
Brendonovich
Brendonovich•2mo ago
which error?
deminearchiver
deminearchiver•2mo ago
Wait, let me get it.
npm add -D vercel
npm add -D vercel
npm run build
npm run build
vercel deploy --prebuilt
vercel deploy --prebuilt
Wait WHAT... It worked! BUT I've been trying to deploy to Vercel for like 2 months now and it wasn't working... I'm pretty sure I'm gonna face some issues in the future This is my first time seeing a Solid Start site deployed by me. I'll keep this thread updated if something breaks.
Brendonovich
Brendonovich•2mo ago
hm vercel-edge is working fine for me
deminearchiver
deminearchiver•2mo ago
That's the point, I haven't seen anyone else to have the same issues as I do. Actually I'm using yarn instead of npm if that means anything (I'm not using Yarn PNP)
Brendonovich
Brendonovich•2mo ago
i use pnpm, maybe that's got something to do with it?
deminearchiver
deminearchiver•2mo ago
idk... package managers shouldn't affect how things work
Brendonovich
Brendonovich•2mo ago
a lot of stuff shouldn't affect how things work 😅
deminearchiver
deminearchiver•2mo ago
Oh, here we go:
No description
deminearchiver
deminearchiver•2mo ago
Oh wait it might be an error on my side pardon me Forgot to add my vite plugins Here it is:
Unhandled Rejection: TypeError: Cannot read properties of undefined (reading 'file')
at Object.get (file:///var/task/chunks/runtime.mjs:5632:33)
at file:///var/task/chunks/runtime.mjs:6836:32
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js process exited with exit status: 128. The logs above can help with debugging the issue.
Unhandled Rejection: TypeError: Cannot read properties of undefined (reading 'file')
at Object.get (file:///var/task/chunks/runtime.mjs:5632:33)
at file:///var/task/chunks/runtime.mjs:6836:32
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js process exited with exit status: 128. The logs above can help with debugging the issue.
Brendonovich
Brendonovich•2mo ago
is that with the hackernews example or your own code?
deminearchiver
deminearchiver•2mo ago
basic example with a few things added, but I haven't really changed much. Here's the problematic peace in the generated runtime.mjs
No description
deminearchiver
deminearchiver•2mo ago
I'm using Vanilla Extract just so you know Maybe it is the cause but I will never give it up
Brendonovich
Brendonovich•2mo ago
i have a feeling it might be though people do use vanilla extract + start already
Want results from more Discord servers?
Add your server