SolidJSS
SolidJS2y ago
54 replies
deminearchiver

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

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",
  },
});

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')  
Was this page helpful?