nuxt-hub / core

Build full-stack applications with Nuxt on CloudFlare, with zero configuration.
https://hub.nuxt.com
Apache License 2.0
993 stars 57 forks source link

SSR Build sticks on the final step #357

Open b2c-devs opened 3 weeks ago

b2c-devs commented 3 weeks ago

Describe the bug

Steps to reproduce Steps to reproduce the behavior:

  1. Create project as described at docs
  2. Click on Deploy
  3. Scroll down to 'build logs' (both Hub and Cloudflare dashboard. Logs attached
  4. See error (after 20 minutes build is still "going") but by logs I see that it has successfully finished

Expected behavior I expected that build will be ok.

image

b2c-webapp-nuxt-2.9cc1dd2c-1000-4423-99d6-368c5314cb4e.log

atinux commented 3 weeks ago

What happens if you build locally using npx nuxt build?

paulvonber commented 2 weeks ago

got maybe related issue as well, it's just that it fails after assets published and nothing is deployed:

image

locally running npx nuxt build everything looks fine

atinux commented 2 weeks ago

Could you check https://hub.nuxt.com/docs/recipes/debug to have better insights of where the __dirname can come from?

paulvonber commented 1 week ago

@atinux locally build seems to run but when I try to launch it, it stuck, doesn't open any page, simply loading without any errors.

image
atinux commented 1 week ago

Can you share the result of npx nuxi info ?

paulvonber commented 1 week ago
- Operating System: `Darwin`
- Node Version:     `v20.17.0`
- Nuxt Version:     `3.14.159`
- CLI Version:      `3.15.0`
- Nitro Version:    `2.10.4`
- Package Manager:  `bun@1.1.34`
- Builder:          `-`
- User Config:      `default`
- Runtime Modules:  `@nuxthub/core@0.8.6`, `@nuxtjs/i18n@9.0.0`, `@nuxt/fonts@0.10.2`, `@nuxt/image@1.8.0`, `@nuxt/eslint@0.6.1`, `@nuxt/ui@2.19.2`, `@pinia/nuxt@0.7.0`, `@unlok-co/nuxt-stripe@4.0.1`, `@vueuse/motion/nuxt@2.2.6`, `@vueuse/nuxt@11.2.0`, `nuxt-lodash@2.5.3`, `nuxt-mapbox@1.6.1`, `nuxt-echarts@0.2.3`, `vue-clerk/nuxt`
- Build Modules:    `-`
paulvonber commented 1 week ago

@atinux that's only thing what I was able to find locally, I'm totally lost it's been a week :(

image
paulvonber commented 1 week ago

@atinux Digging deeper into the compiled code I've found only usage off __dirname in libvips library

image image

I don't have it installed directly, but looks like it comes over this way: NuxtImg -> IPX -> sharp -> libvips

atinux commented 1 week ago

Right now we don't have proper support for Nuxt Image with IPX in production, could you try to use the Cloudflare Images provider for production?

paulvonber commented 1 week ago

The thing is that I'm not using IPX provider at all, I'm using Cloudflare only and everything was working as expected until I've upgraded to nuxt 3.14.0 and @nuxthub/core 0.8.6, so I'm really confused and have no clue where to look for a help :(

paulvonber commented 1 week ago

@atinux need to say sorry!!! for annoying you, I've found sharp import in my api routes which was obviously the cause of the problem 🤕

atinux commented 1 week ago

Glad you found the issue 🙂