Skip to content

Node.JS dependency version requirement mismatch breaks Cloudflare deployments #13605

Description

@ethrx

Astro Info

Astro                    v5.6.1
Node                     v22.13.1
System                   Windows (x64)
Package Manager          npm
Output                   static
Adapter                  @astrojs/cloudflare
Integrations             @astrojs/react
                         @astrojs/sitemap
                         astro-robots-txt
                         @astrojs/partytown
                         astro-compressor

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

The package yocto-spinner is listed in dependencies in packages/db/package.json has listed a higher version of node in their package.json:

"engines": {
  "node": ">=18.19"
},

https://github.com/sindresorhus/yocto-spinner/blob/main/package.json

As noted in the quick checklist and https://docs.astro.build/en/install-and-setup/, the minimum supported Node.JS version is v18.17.1.

Cloudflare is set to use v18.17.1 on deployments.
https://developers.cloudflare.com/pages/configuration/build-image#supported-languages-and-tools

So when you try and deploy with cloudflare without setting your NODE_VERSION to one higher than the minimum Astro recommends:


22:08:51.118 | Installing project dependencies: npm clean-install --progress=false
-- | --
22:08:52.027 | npm WARN EBADENGINE Unsupported engine {
22:08:52.027 | npm WARN EBADENGINE   package: 'yocto-spinner@0.2.1',
22:08:52.027 | npm WARN EBADENGINE   required: { node: '>=18.19' },
22:08:52.027 | npm WARN EBADENGINE   current: { node: 'v18.17.1', npm: '9.8.1' }

You can find a similar description of this issue here:
sveltejs/kit#12464

What's the expected result?

Astro downgrades the package or updates the minimum node version.

Link to Minimal Reproducible Example

Not aplicable

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P2: has workaroundAn edge case that only affects very specific usage, but has a trivial workaround (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions