S
SolidJS•12mo ago
daz.dev

Deploying vanilla Start Beta2 to Netlify fails, edge function crashes

Trying to get a base Solid Start build deployed to Netlify, by actioning: - pnpm create solid@beta - pnpm install - Add netlify.toml, with build.publish of /dist - Ensure vite.config sets start.server.preset to netlify_edge Tried deploying with GitHub push to branch and manually with Netlify CLI, to same result. Build and deploy succeeds on Netlify dashboard, however the browser shows error: This edge function has crashed Logs:
Dec 29, 01:52:14 PM: 01HJTXHK error [nitro server handler] [nitro] [request error] [unhandled] Cannot read properties of undefined (reading 'assets')
at Object.get assets (file:.//root/.netlify/edge-functions/server/server.js:1:221414)
[...snip]
at file:.//root/.netlify/edge-functions/server/server.js:1:224695Dec 29, 01:52:14 PM: error TypeError: Cannot read properties of undefined (reading 'routes')
at file:///root/.netlify/edge-functions/server/server.js:1:220727
at eventLoopTick (ext:core/01_core.js:178:11)Dec 29, 01:52:20 PM: 01HJTXHS error [nitro server handler] [nitro] [request error] [unhandled] Cannot read properties of undefined (reading 'assets')
[...snip]
at file:.//root/.netlify/edge-functions/server/server.js:1:224695Dec 29, 01:52:20 PM: error TypeError: Cannot read properties of undefined (reading 'routes')
at file:///root/.netlify/edge-functions/server/server.js:1:220727
at eventLoopTick (ext:core/01_core.js:178:11)Dec 29, 01:52:21 PM: 01HJTXHT error [nitro server handler] [nitro] [request error] [unhandled] Cannot read properties of undefined (reading 'assets')
at Object.get assets (file:.//root/.netlify/edge-functions/server/server.js:1:221414)
[...snip]
Dec 29, 01:52:14 PM: 01HJTXHK error [nitro server handler] [nitro] [request error] [unhandled] Cannot read properties of undefined (reading 'assets')
at Object.get assets (file:.//root/.netlify/edge-functions/server/server.js:1:221414)
[...snip]
at file:.//root/.netlify/edge-functions/server/server.js:1:224695Dec 29, 01:52:14 PM: error TypeError: Cannot read properties of undefined (reading 'routes')
at file:///root/.netlify/edge-functions/server/server.js:1:220727
at eventLoopTick (ext:core/01_core.js:178:11)Dec 29, 01:52:20 PM: 01HJTXHS error [nitro server handler] [nitro] [request error] [unhandled] Cannot read properties of undefined (reading 'assets')
[...snip]
at file:.//root/.netlify/edge-functions/server/server.js:1:224695Dec 29, 01:52:20 PM: error TypeError: Cannot read properties of undefined (reading 'routes')
at file:///root/.netlify/edge-functions/server/server.js:1:220727
at eventLoopTick (ext:core/01_core.js:178:11)Dec 29, 01:52:21 PM: 01HJTXHT error [nitro server handler] [nitro] [request error] [unhandled] Cannot read properties of undefined (reading 'assets')
at Object.get assets (file:.//root/.netlify/edge-functions/server/server.js:1:221414)
[...snip]
Test repo here: https://github.com/darrenbarklie/solid-start-beta2 Thanks in advance!
GitHub
GitHub - darrenbarklie/solid-start-beta2
Contribute to darrenbarklie/solid-start-beta2 development by creating an account on GitHub.
8 Replies
Metru
Metru•12mo ago
@daz.dev ./dist is not output directory. SolidStart builds to ./.output. The run command is "start": "node ./.output/server/index.mjs" In previous version of solidstart, to deploy to vercel I needed to install the adapter, but not anymore. Maybe try deploying to vercel without a netlify.toml and see if netlify "figures it out".
daz.dev
daz.devOP•12mo ago
@Metru Thanks! Will loop back shortly to try this config. 🙂
Metru
Metru•12mo ago
Feel free to @me if this doesn't work. I'm slowly mastering all the quirks & bugs of this release hehe
daz.dev
daz.devOP•12mo ago
Hey @Metru – deployed to Vercel first time: https://solid-start-beta2-suupjbxso-darrenbarklie.vercel.app/about Strange that the Netlify journey isn't as smooth.
daz.dev
daz.devOP•12mo ago
Vanilla solidstart/mdx build that doesn't provide an netlify.toml and targets netlify_edge fails
No description
daz.dev
daz.devOP•12mo ago
Configuration error:
Deploy did not succeed: Deploy directory "netlify" does not exist
Configuration error:
Deploy did not succeed: Deploy directory "netlify" does not exist
When I change the Netlify interface Publish directory to /.output it similarly fails Ah yeah, this needs to be set to dist -- obvious now. Netlify deployed: https://659012a4ca65440008130773--iridescent-toffee-84678c.netlify.app/ No netlify.toml required. I'm starting to understand the advantage of Nitro and Vinxi now, your message prompted me to build locally to better understand the process. Will try integration of some server functions for completeness.
Metru
Metru•12mo ago
Vercel is a sponsor of solid, so they likely wanted to make 100% sure it was easiest to deploy there
daz.dev
daz.devOP•12mo ago
Yeah, I think it was my new-ness to Netlify rather than a problem with Solid Start.
Want results from more Discord servers?
Add your server