Logo-amall

cloudflare builds failed, working on local enviroment.

Last active 2 days ago

15 replies

0 views

  • HA

    Error:Could not find the Nhost auth client. Did you wrap your app in

  • HA

    we have deployed our site in cloudflare many months ago, and 19 days ago when we rebuild our app it will throw error in cloudflare environment.
    in local env it is work fine.

  • SI

    @elitan any ideas what might have caused this?

  • SI

    we had to implement a weird hack a while back because nhost didn't work with statically generated pages (trying to find that thread), i'm wondering if you fixed it and and we need to roll back the hack we implemented

  • SI

    https://github.com/nhost/nhost/issues/873

  • SI

    @Szilard any ideas on how to repair this?

  • SZ

    Could you share some code I can have a look at? We have fixed this issue and folks who had this problem didn’t say that it’s broken for them again.

  • SZ

    Have you updated the SDK version since then? Could you share your package.json please?

  • SI

    @Szilard we didn't, here is the hacky workaround we had used https://gist.github.com/simpson/06513af56a4c632a5c9fcf585468063f

  • SZ

    This issue has been fixed in an SDK version that was released around the time the GH issue was resolved. You haven't shared your package.json, so I can just assume that you are using an older version.

    Basically the problem here is that you are rendering a completely different tree on the server-side and the client-side.

  • SZ

    Feel free to upgrade and remove the workaround @simpson

  • SZ

    I'll investigate this Cloudflare related issue today.

  • SZ

    I tried to deploy a super simple Next.js application to Cloudflare Pages that uses the NhostProvider and it went through without any problems. Did you also try to deploy the app to Cloudflare Pages? If yes, then could you please share details about your project with me? (some code would be the best)

  • SI

    We were behind on updating, we did that and with a few other tweaks we are back up and running. Thanks~!

  • SZ

    awesome!

Last active 2 days ago

15 replies

0 views