vitesse-ssr-template: Server returns "Not Found"

Hi I cloned it and deployed it to Vercel.(https://vitesse-suspense-test.vercel.app/) I recognized this App was in SSR, but index.html(Inspect → Source) returned from server didn’t include any content. I assume that this problem comes from the failure of rendering. Does anyone know how to fix this.

<div all="index.html" server="true" message="This is page &quot;ALL&quot;">Not found</div>

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (14 by maintainers)

Most upvoted comments

@nicholasoxford Is this your site? 😛 https://dreamland-test-frandiox.vercel.app/

Problems

  • Use import.meta.env.xxx instead of process.env.xxx
  • As mentioned earlier, you need to add dependencies to serverless/package.json. It was missing @stripe/stripe-js

For the next time, you can just check the runtime logs in Vercel (not the build, but the runtime – Tab called “Functions”). This part was showing errors saying “did you forget to add @stripe/stripe-js to dependencies?”

@chujanen Please check if you have the same issue.

I think Vercel was adding support for pnpm, things should be simpler when that happens since we can just copy the lock file automatically.

@chujanen It should work the same way. There’s an Express.js example here. In that example you can see that anything that doesn’t match /api will be rendering an HTML page. That renderPage function has a copy of the index.html inside, basically.