Skip to content

bug: @ionic/core does not install with node < 24 (yarn) #30868

@emmaus-zam

Description

@emmaus-zam

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

We are using node 20 on our dev and production machines. Since the version 8.7.12 ionic does not install anymore (tested with yarn):

error @ionic/[email protected]: The engine "node" is incompatible with this module. Expected version "24.x". Got "20.19.0"

Yarn stops the install process at this point.

I assume this isn't intended? I see no reason why ionic would need node 24.

The change was introduced here: #30816

From what i see testing the ionic starter on stackblitz, npm install shows an error but does continue the install. Better, but still not intended i assume.

Expected Behavior

@ionic/core installs when using node versions 20 or 22 using yarn

Steps to Reproduce

Create a new project with ionic using node 20. Execute yarn. Install shows an error and stops. (npm install shows an error but continues).

Code Reproduction URL

https://stackblitz.com/edit/pwp89vlp?file=package.json

Ionic Info

I obviously downgraded to ionic 8.7.11 in order to be able to install it.

Ionic:

Ionic CLI : 7.2.1 (/Users/emmaus/.local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.7.11 (/Users/emmaus/code/emmono/node_modules/@ionic/angular)
@angular-devkit/build-angular : 21.0.0 (/Users/emmaus/code/emmono/node_modules/@angular-devkit/build-angular)
@angular-devkit/schematics : 20.3.13 (/Users/emmaus/code/emmono/node_modules/@angular-devkit/schematics)
@angular/cli : 21.0.0 (/Users/emmaus/code/emmono/node_modules/@angular/cli)
@ionic/angular-toolkit : 12.3.0 (/Users/emmaus/code/emmono/node_modules/@ionic/angular-toolkit)

Capacitor:

Capacitor CLI : 7.4.4
@capacitor/android : 7.4.4 (/Users/emmaus/code/emmono/node_modules/@capacitor/android)
@capacitor/core : 7.4.4 (/Users/emmaus/code/emmono/node_modules/@capacitor/core)
@capacitor/ios : 7.4.4 (/Users/emmaus/code/emmono/node_modules/@capacitor/ios)

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v20.19.0 (/opt/homebrew/Cellar/node@20/20.19.0_1/bin/node)
npm : 11.7.0
OS : macOS Unknown

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions