Missing @angular/core peerDependency within store-devtools
Closed this issue · 1 comments
janicmikes commented
Which @ngrx/* package(s) are the source of the bug?
store-devtools
Minimal reproduction of the bug/regression with instructions
When installing the devtools using pnpm and its isolated modules. Building the application will fail because there is no @angular/core package available to the devtools.
✘ [ERROR] Missing "./rxjs-interop" specifier in "@angular/core" package [plugin vite:dep-pre-bundle]
7 │ import { toSignal } from '@angular/core/rxjs-interop';
The modules look as follows:
- .pnpm/@ngrx+store-devtools.../
- node_modules/
- @ngrx/
- store/
- store-devtools/
- rxjs/
- tslib/
Expected behavior
The @angular/core package should be setup as a peerDependency to match the @ngrx/store module.
Where the modules look as follows:
- .pnpm/@ngrx+store.../
- node_modules/
- @angular/core/ <---
- @ngrx/
- store/
- store-devtools/
- rxjs/
- tslib/
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)
PNPM@9.6.0
Other information
No response
I would be willing to submit a PR to fix this issue
- Yes
janicmikes commented
As a workaround you can add the dependency manually to the lockfile (version numbers may differ).
This will ensure that the angular/core package is available for the devtools during build.
...
'@ngrx/store-devtools@18.0.2(@ngrx/store@18.0.2(@angular/core@18.1.3(rxjs@7.8.1)(zone.js@0.14.10))(rxjs@7.8.1))(rxjs@7.8.1)':
dependencies:
+ '@angular/core': 18.1.3(rxjs@7.8.1)(zone.js@0.14.10)
'@ngrx/store': 18.0.2(@angular/core@18.1.3(rxjs@7.8.1)(zone.js@0.14.10))(rxjs@7.8.1)
rxjs: 7.8.1
tslib: 2.6.3
...
This should result in a +1 dependency when using pnpm install
Lockfile is up to date, resolution step is skipped
Packages: +1
+
Progress: resolved 1, reused 1, downloaded 0, added 0, done