Repository navigation
Description
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
- Create an empty directory.
- 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"
}
}- 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:
-
Resolving oxc-parser@0.158.0 independently with strict peer dependency resolution succeeds.
-
The standalone OXC lockfile includes native bindings for Windows x64, Linux x64 GNU, and Linux x64 MUSL.
-
The standalone OXC lockfile does not include @oxc-parser/binding-wasm32-wasi, @emnapi/core, @emnapi/runtime, or @napi-rs/wasm-runtime.
-
Angular Build 22.3.0 explicitly declares the OXC WASM binding as an optional dependency.
-
Using --omit=optional still reproduces the same ERESOLVE error.
-
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.
Activity
alan-agius4 commentedon Nov 30, 2026
This is an upstream issue in
@oxc-parser/binding-wasm32-wasi, tracked in oxc-project/oxc#29693 and napi-rs/napi-rs#3674.@oxc-parser/binding-wasm32-wasiwas added as an optional dependency of@angular/buildto support WebContainer environments such as StackBlitz and the angular.dev playground (see #34524), sinceoxc-parserdoes not declare it yet (oxc-project/oxc#28260). Currently, all published versions through0.161.0pair@emnapi/core/@emnapi/runtime2.0.0-alpha.6with@napi-rs/wasm-runtime@~1.2.7, whose peer dependency range no longer accepts2.0.0-alpha.6.Once a fixed
oxc-parserrelease is published upstream, we will update@angular/buildto pick it up. In the meantime, if you are using--strict-peer-deps, you can work around this by pinning@napi-rs/wasm-runtimeto1.2.5(which OXC builds against and accepts2.0.0-alpha.6) via npmoverrides: