cloudflare / pages-build-image

Apache License 2.0
44 stars 1 forks source link

Cloudflare pages are now incompatible with Gatsby #2

Open edenworky opened 1 year ago

edenworky commented 1 year ago

ℹ️ Gatsby dropped their support for node 16, so Cloudflare pages are now incompatible with Gatsby: https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v4-to-v5/

Originally posted by @ekeih in https://github.com/cloudflare/pages-build-image/discussions/1#discussioncomment-4120141

edenworky commented 1 year ago

Gatsby 5's minimal Node version is 18.0.0 https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v4-to-v5/#minimal-nodejs-version-1800

On Thu, Nov 17, 2022 at 3:35 AM figuerom16 @.***> wrote:

You can manually set NODE_VERSION 17 in your Environment Variables.

— Reply to this email directly, view it on GitHub https://github.com/cloudflare/pages-build-image/issues/2#issuecomment-1317929826, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRQMPRSLXIC3DY7EZVMK4TWIWDU3ANCNFSM6AAAAAAR7HOPSA . You are receiving this because you authored the thread.Message ID: @.***>

marvos-mingle commented 1 year ago

We have the same problem, is there any way to use node 18.? Or is there a known date when it's possible to use node 18.?

ivanvanderbyl commented 1 year ago

Same with SvelteKit Cloudflare Adapter, it is explicitly not compatible with Node 17 (the current max version), and requires 18 or above.

Given that Pages only supports Node 16 & 17 (released 14 months ago) and Node 18 has been LTS for 4 months, and 19 is current, it feels very much like Cloudflare are not interested in maintaining this service.

lucasnad27 commented 1 year ago

I think the CF team has been very busy over the past couple of months getting other products to GA. While I'm frustrated by this issue too (I have production apps I'm waiting to bump to node v18), I do believe they are committed to the pages platform. This discussion dedicated to their build image update might provide some more context, in particular, this comment.

Fingers crossed that support comes very soon!

andrzejkaras commented 1 year ago

I have a small workaround for those who want to deploy a static website on CF Pages developed using Gatsby, which requires a Node higher than 16.0.0.

You could use the drag & drop method of uploading static content described here: https://developers.cloudflare.com/pages/platform/direct-upload. Thanks to that you could build your website with the newest version of Gatsby and eg. Node 18.0.0 and upload it as described in the article.

The only problem is switching the custom domain when Node 18 would be supported by the regular deployment of CF Pages. But it would work for testing purposes.