-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
defaultServerConditions is not iterable #435
Comments
Getting this with solid-start 1.0.10 + vinxi 0.5.1 + vite 6 Make sure that you override the vite version in your package.json if you are hitting this error. Like so:
|
@katywings you are a lifesaver. |
@Marvin-Brouwer does that repro in stackblitz? Without vinxi |
@birkskyum sorry for the late reply, I haven't been able to respond due to personal situation. I had a quick look, I don't think I have exotic stuff. I'd need to invest more time, which I don't have at the moment. |
@timothyallan make sure you have no vite v5 installations, vinxi 0.5.3 will attempt to pull in vite 6 which is needed here. make sure you also are on the latest version of |
I can build locally but get errors in cloudflare pages. 20:12:07.174 | 📦 Compiling ssr router... -- | -- 20:12:07.174 | vinxi building router ssr in http mode 20:12:07.446 | [error] defaultServerConditions is not iterable 20:12:07.446 | at configEnvironment (node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/vite-plugin-solid/dist/esm/index.mjs:133:43) 20:12:07.447 | at async runConfigEnvironmentHook (node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-ByPKlqZ5.js:54653:19) 20:12:07.447 | at async resolveConfig (node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-ByPKlqZ5.js:54038:3) 20:12:07.447 | at async createBuilder (node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-ByPKlqZ5.js:51930:18) 20:12:07.447 | at async Module.build (node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-ByPKlqZ5.js:51219:19) 20:12:07.447 | at async createViteBuild (node_modules/.pnpm/[email protected][email protected]/node_modules/vinxi/lib/build.js:395:17) 20:12:07.447 | at async createRouterBuild (node_modules/.pnpm/[email protected][email protected]/node_modules/vinxi/lib/build.js:529:2) 20:12:07.447 | at async node_modules/.pnpm/[email protected][email protected]/node_modules/vinxi/lib/build.js:59:5 20:12:07.447 | at async createBuild (node_modules/.pnpm/[email protected][email protected]/node_modules/vinxi/lib/build.js:58:4) 20:12:07.447 | at async Object.run (node_modules/.pnpm/[email protected][email protected]/node_modules/vinxi/bin/cli.mjs:235:5) 20:12:07.448 | at async runCommand (node_modules/.pnpm/[email protected]/node_modules/citty/dist/index.mjs:316:16) 20:12:07.448 | at async runCommand (node_modules/.pnpm/[email protected]/node_modules/citty/dist/index.mjs:307:11) 20:12:07.448 | at async runMain (node_modules/.pnpm/[email protected]/node_modules/citty/dist/index.mjs:445:7) 20:12:07.448 | 20:12:07.448 | [error] defaultServerConditions is not iterable 20:12:07.457 | [error] Exited with code: 1 20:12:07.457 | at CommandChild.pipedStdoutBuffer (node_modules/.pnpm/[email protected]/node_modules/dax-sh/esm/mod.js:9392:19) 20:12:07.457 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 20:12:07.457 | 20:12:07.458 | [error] Exited with code: 1 20:12:07.469 | ELIFECYCLE Command failed with exit code 1. 20:12:07.498 | Failed: Error while executing user command. Exited with error code: 1 20:12:07.508 | Failed: build command exited with code: 1 20:12:08.309 | Failed: error occurred while running build command my package.json: {
"name": "example-basic",
"type": "module",
"scripts": {
"dev": "vinxi dev",
"build": "vinxi build",
"start": "vinxi start",
"version": "vinxi version",
"preview": "pnpm run build && npx wrangler pages dev",
"deploy": "pnpm run build && wrangler pages deploy"
},
"dependencies": {
"@corvu/drawer": "^0.2.2",
"@kobalte/core": "^0.13.7",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.3",
"@solidjs/start": "^1.1.3",
"@supabase/ssr": "^0.5.2",
"@supabase/supabase-js": "^2.46.1",
"@unocss/reset": "^0.64.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lucide-solid": "^0.460.0",
"solid-js": "^1.9.5",
"tailwind-merge": "^2.5.4",
"ts-fsrs": "^4.5.2",
"unocss-preset-animations": "^1.1.0",
"vinxi": "^0.5.3"
},
"engines": {
"node": ">=18"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20241106.0",
"unocss": "^0.64.1",
"wrangler": "^3.112.0"
}
} |
@Eliot00 , notice the "[email protected]" in the output you shared - that's the issue. There is a vite 5 installation. You can try to delete and recreate your lockfile, or explicit add vite 6 to the list of dependencies. Or, depending on which package manager you use, add vite 6 to the overrides / resolutions in package.json to force use of vite 6 |
@birkskyum Thank you for your response. I just managed to deploy successfully by building locally and uploading the assets without making any changes to the code. I'm not sure why the Cloudflare Github automatic integration deployment method is throwing an error. I'll try upgrading Vite later to see if that resolves the issue. |
Excellent! It could be a cache somewhere causing problems. |
Hah yeah I forgot to update vite (and vinxi) and Birk's advice fixed it - thanks! |
This is hit in
It also seems possible to hit with vinxi 0.5.1 from solid-start.
It's only vite v6 that has the defaultServerConditions, so this happen when a version below v6 is used.
The text was updated successfully, but these errors were encountered: