Skip to content

Angular 22.3.0 installation fails with ERESOLVE due to incompatible OXC WASM and EMNAPI peer dependencies #34798

Backlog

Description

@hectordgm

Command

other

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

22.2.0

Description

Angular 22.3.0 fails to resolve its dependency tree in a clean, isolated project when using strict npm peer dependency resolution.

The issue is caused by incompatible dependency requirements between the optional OXC WASM binding and NAPI-RS WASM Runtime.

@angular/build@22.3.0 declares @oxc-parser/binding-wasm32-wasi@0.158.0 as an optional dependency.

This binding requires @emnapi/core and @emnapi/runtime version 2.0.0-alpha.6, while @napi-rs/wasm-runtime@1.2.7 declares peer dependency ranges that do not accept this version.

We reproduced the same issue using four different npm versions: 10.9.9, 10.9.11, 11.21.3, and 12.2.3.

The reproduction does not include application-specific code, custom overrides, or existing node_modules.

Expected behavior: Angular dependencies should resolve successfully without requiring force, legacy-peer-deps, or unsupported dependency overrides.

Minimal Reproduction

  1. Create an empty directory.
  2. Create the following package.json:
{
  "name": "angular22-isolated-test",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "@angular/animations": "22.3.0",
    "@angular/common": "22.3.0",
    "@angular/compiler": "22.3.0",
    "@angular/core": "22.3.0",
    "@angular/forms": "22.3.0",
    "@angular/platform-browser": "22.3.0",
    "@angular/router": "22.3.0",
    "rxjs": "7.8.2",
    "zone.js": "0.15.1",
    "tslib": "2.8.1"
  },
  "devDependencies": {
    "@angular/cli": "22.3.0",
    "@angular/compiler-cli": "22.3.0",
    "@angular-devkit/build-angular": "22.3.0",
    "typescript": "6.0.3"
  }
}
  1. Run the following command:
npm install --package-lock-only --lockfile-version=3 --strict-peer-deps --legacy-peer-deps=false --force=false --include=optional --include=peer --include=dev --include=prod --ignore-scripts --audit=false --fund=false --registry=https://registry.npmjs.org/

Expected result: successful dependency resolution and generation of package-lock.json.

Actual result: ERESOLVE, exit code 1, and no package-lock.json generated.

The same result was reproduced using npm 10.9.9, 10.9.11, 11.21.3, and 12.2.3.

Exception or Error

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree

npm error While resolving: @oxc-parser/binding-wasm32-wasi@0.158.0
npm error Found: @emnapi/core@2.0.0-alpha.6

npm error Could not resolve dependency:
npm error peer @emnapi/core@"^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3" from @napi-rs/wasm-runtime@1.2.7

Dependency chain:

@angular-devkit/build-angular@22.3.0
  -> @angular/build@22.3.0
    -> @oxc-parser/binding-wasm32-wasi@0.158.0
      -> @emnapi/core@2.0.0-alpha.6
      -> @napi-rs/wasm-runtime@1.2.7

The required EMNAPI version does not satisfy the WASM Runtime peer dependency range.

Your Environment

Operating System: Windows x64
Node.js: 22.23.5

Tested npm versions:
- 10.9.9
- 10.9.11
- 11.21.3
- 12.2.3

Target Angular version: 22.3.0
Target Angular CLI version: 22.3.0
Target Angular Build version: 22.3.0
TypeScript: 6.0.3
RxJS: 7.8.2
Zone.js: 0.15.1

Registry: https://registry.npmjs.org/

The ng version command cannot be executed using the target project's local Angular CLI because dependency resolution fails before installation completes.

Anything else relevant?

Additional diagnostic findings:

  1. Resolving oxc-parser@0.158.0 independently with strict peer dependency resolution succeeds.

  2. The standalone OXC lockfile includes native bindings for Windows x64, Linux x64 GNU, and Linux x64 MUSL.

  3. The standalone OXC lockfile does not include @oxc-parser/binding-wasm32-wasi, @emnapi/core, @emnapi/runtime, or @napi-rs/wasm-runtime.

  4. Angular Build 22.3.0 explicitly declares the OXC WASM binding as an optional dependency.

  5. Using --omit=optional still reproduces the same ERESOLVE error.

  6. Registry metadata inspected on November 27, 2026, shows no published WASM Runtime version within the required ~1.2.7 range that accepts EMNAPI 2.0.0-alpha.6.

Could the Angular CLI team review this optional dependency and provide guidance on an officially supported resolution?

Thank you for your time and assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions