Closed caboodal closed 3 months ago
OK I need @ngrx/store installed as a dependency as well, is there a document to explain the setup and also what I can achieve with the dev tools?
@caboodal, that's a bug. we will make the redux-connector as a second entrypoint. by that, you only need @ngrx/store if you use the connector.
the only documentation so far is the README. there is not so much you can do at the moment. What kind of requirements would you have?
I was keen to be able to visualize the signal store state like I did with the redux pattern, that was incredibly useful. I can't find the Ngrx Devtools extension in the Chrome store to progress any further?
@caboodal It is the same Redux extension you use for the Ngrx Devtools. You just add withDevtools
and the Redux Devtools will show the NgRx Signal Store.
Ah OK I thought I'd tried that, OK no worries I'll take another look.
@caboodal did it work?
@caboodal Can you do me a favor and check what compilerOptions -> moduleResolution
in your tsconfig.json
is set to? I get the same error with moduleResolution: bundler
. Some other options like node10
worked fine.
@caboodal did it work?
Yes it did, I did uninstall it the other day so just reinstalled it and I can now see my state
@caboodal Can you do me a favor and check what
compilerOptions -> moduleResolution
in yourtsconfig.json
is set to? I get the same error withmoduleResolution: bundler
. Some other options likenode10
worked fine.
"moduleResolution": "node"
We are getting the same build error (^18.0.2
versions). We've tried with moduleResolution
of "node"
and "node10"
- no luck.
@ngrx/store
I installed @ngrx/store as a dependency to make it work, I assume once the bug is resolved we can then remove that superfluous dependency again.
As there seems to be a few responses I've reopened the issue.
Hi Team, We are using angular latest version and ngrx-toolkit as well. In our team also facing the same issue. Attaching the screenshot for reference.
@maniya108 sorry for that. the quick workaround is to install @ngrx/store. We will soon have the fix which puts the redux connector as second entry point, meaning, you need @ngrx/store only, if you USE the connector.
Starting vom 18.0.3, you should not get any compilation errors anymore.
If you use the redux-connector, you must import it via a secondary entrypoint (see docs) and then you require @ngrx/store.
@maniya108, @caboodal @the1979: can somebody of you confirm that it is now working for you as well? Unfortunately, I was not able to reproduce it.
This seems to be relevant to this issue
This update to 18.0.3 allowed me to pull out @ngrx/store
of the dependencies to get the toolkit working on Stackblitz. No more error like the one in this issue.
It also fixed type issues I had with updateState
taking in incorrect types without @ngrx/store
being imported. Now it detects type errors without it.
Starting vom 18.0.3, you should not get any compilation errors anymore.
If you use the redux-connector, you must import it via a secondary entrypoint (see docs) and then you require @ngrx/store.
@maniya108, @caboodal @the1979: can somebody of you confirm that it is now working for you as well? Unfortunately, I was not able to reproduce it.
@rainerhahnekamp I can confirm that 18.0.3
fixes it for us. Thank you!
Great, thanks for your quick response!
Hi @rainerhahnekamp
Everything now building successfully without the need for a dependency on @ngrx/store, many thanks!
Sorry for the slow response, just returned from holiday :-)
Just added the toolkit ^18.0.2 to my project with @ngrx/signals ^18.0.2 and I get the following build errors after adding withDevtools to a single signalStore.
X [ERROR] TS2307: Cannot find module '@ngrx/store/src/models' or its corresponding type declarations. [plugin angular-compiler]
X [ERROR] TS2307: Cannot find module '@ngrx/store/src/models' or its corresponding type declarations. [plugin angular-compiler]