My code is executed in the build step, crashing because of missing env vars
So I have a solid-start project that I want to deploy to pages.
I have a problem with deployment to Cloudflare pages though. After the build is complete and code is uploaded, my code is executed in the build step. This leads to a deploy error, because the environment variables aren't available so the code throws.
Why does this happen? It doesn't make sense to me. As the error happens after upload I suspect this is not an error with solid-start, but I could be wrong about that of course.
2 Replies
I don't expect my code to run until I visit the app. The "No connection string" error is thrown by me
I think it's something related with ENV and secret