Deploying solidstart problems
TBF I probably have 2 separate problems.
I'm trying to deploy a start project on vercel, all I get after a successful build is a 404 NOT_FOUND error, when visiting my page. This is my first issue and I'm getting no clues as to what could be wrong.
When building locally, in order to test it out, I can't try out my build because the data in my .env file, which works in dev mode, doesn't seem to be included in the build, so the whole app crashes as the server tries to use an env variable that doesn't exist. I can't identify why this would happens as my file is simply name
.env
so it should be included every time.
I have not touched the app.config.ts
file besides for adding middleware. What am I doing wrong?2 Replies
For vercel you should set
server.preset
to vercel
.env
variables will only be included at dev and build time, at runtime provide them via your CLI environment or use a package like dotenv
This seems to have fixed the vercel deployment issue, but can't confirm 100% yet.
Ok yeah it, simply adding the preset worked perfectly. Thanks a bunch!