solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

Solid start build sometimes doesn't work on vercel

Open OrJDev opened this issue 3 years ago • 12 comments

(Sometimes) Log stucks on vercel when trying to build & deploy, no error or anything it just freezes. It does work when trying to build locally but it is pretty annoying having to wait for it to build before running

vercel deploy --prebuilt.

Any idea what causes that?

OrJDev avatar Oct 30 '22 16:10 OrJDev

(here) Screenshot_1

OrJDev avatar Oct 30 '22 16:10 OrJDev

I think this might be a bug with our SPA mode build. We start a vite dev server to ask for the index.html but we should probably figure out a different solution. I have some ideas. You can keep ssr: true for now? That should be more reliable

nksaraf avatar Oct 31 '22 21:10 nksaraf

Based on my stack I really prefer not to, but if that's the only solution I'll do that.

OrJDev avatar Nov 01 '22 08:11 OrJDev

Just a workaround for vercel until we fix this.. or you can build locally and deploy using vercel deploy --prebuilt

nksaraf avatar Nov 01 '22 23:11 nksaraf

Just a workaround for vercel until we fix this.. or you can build locally and deploy using vercel deploy --prebuilt

Bulding and deploying it locally is more complicated when using Prisma, it requires additional configuration and since all of my projects use Prisma this isn't an ideal solution.

OrJDev avatar Nov 02 '22 19:11 OrJDev

Ahh okay makes sense. Is there a repo I can look at and try.. Have been meaning to figure out is prisma works properly.. I can debug the issues better than way

nksaraf avatar Nov 02 '22 21:11 nksaraf

Sure

https://github.com/OrJDev/solid-trpc-authentication

Edit: Also notice that i deployed this not using the cli but using the vercel website connected to a github repo - so Prisma does work on the website that's linked to the repo, so try to debug it when deploying using the vercel cli and not when deploying from the vercel website.

OrJDev avatar Nov 03 '22 04:11 OrJDev

Ahh okay so it works when deployed from vercel website but not locally ?

nksaraf avatar Nov 03 '22 20:11 nksaraf

Ye i mean you could try any repo that uses prisma, not mine specifically. If you build it locally and deploy it using the cli it will throw some ssl xxx weird error, therefore it needs to be built in vercel environment instead.

OrJDev avatar Nov 03 '22 20:11 OrJDev

hi! i ran into the same issue when using pnpm as my package manager, solved this issue by using yarn instead!

aidanaden avatar Nov 15 '22 05:11 aidanaden

The same thing happens to me. Suddenly It can't be deployed. I tried to use yarn instead of pnpm, but never solved. ~I add source code about <Context>, that might cause this failed?~ I don't know..., sorry I am very new. image

atzzCokeK avatar Nov 18 '22 04:11 atzzCokeK

When I change to ssr mode, the error is updated! image

atzzCokeK avatar Nov 18 '22 04:11 atzzCokeK

Same problem here

rshov avatar Dec 16 '22 14:12 rshov

Not a definitive answer, but longer thread on Discord, basically you can have a typo in an import (and possibly other things) and it will get stuck in a loop at that point in the build process before it can fail that.

screenshot_20221218-090501_Code_-_Insiders_y55sfyCTl6

AshSimmonds avatar Dec 22 '22 12:12 AshSimmonds

Please retry again 0.2.19. I've made some big improvements to ssr: false. I can't reproduce the issue locally at least by messing with imports.

ryansolid avatar Feb 03 '23 06:02 ryansolid

Please retry again 0.2.19. I've made some big improvements to ssr: false. I can't reproduce the issue locally at least by messing with imports.

Yes this seems to work with the exact same project that failed with older versions:



solid-start building client...
--
10:13:47.448 | solid-start rendering index.html...
10:13:49.696 | solid-start index.html rendered in: 2.248s
10:13:49.736 | vite v3.2.5 building for production...
10:13:49.763 | transforming...
10:13:53.533 | ✓ 212 modules transformed.
10:13:53.602 | Inspect report generated at /vercel/path0/.solid/inspect


closing this

OrJDev avatar Feb 03 '23 08:02 OrJDev