angular-ngrx-material-starter: Error running a new-project on the example component when uses the State
Hey I initialized a new project I follow all steps of the installation but when I try running the repository I obtain this output:
ERROR in src/app/examples/examples/examples.component.ts(56,13): error TS2345: Argument of type '(source$: Observable<State>) => Observable<SettingsState>' is not assignable to parameter of type 'OperatorFunction<State, SettingsState>'. Types of parameters 'source$' and 'source' are incompatible. Type 'import("/home/gd.martinez/Downloads/Bakuq/Projects/Repos/new-project/node_modules/rxjs/internal/O...' is not assignable to type 'import("/home/gd.martinez/Downloads/Bakuq/Projects/Repos/new-project/node_modules/rxjs/internal/O...'. Two different types with this name exist, but they are unrelated. Type 'import("/home/gd.martinez/Downloads/Bakuq/Projects/Repos/new-project/src/app/examples/examples.st...'is not assignable to type 'import("/home/gd.martinez/Downloads/Bakuq/Projects/Repos/new-project/src/app/settings/settings.mo...'. Property 'settings' is missing in type 'State'.
Any ideas on how to fix this?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (5 by maintainers)
I had the same problem, but only when using yarn. changing to “rxjs”: “6.2.2” resolved problem
The problem showed again while I was trying to add a module in it. But this time, npm start works and the pages work just fine. Only the error message showed on the terminal and npm test could not proceed. I don’t know exactly which of my actions triggered this problem; however, by downgrading rxjs from 6.3.3 to 6.2.2 as @stefanwuthrich suggested, the error is gone and npm test works as well. Thanks.
I started with node v8.10.0 and npm 3.5.2; got the same error @gdmartinez93 described.
Upgraded node to v8.12.0 and npm to 6.4.1; npm start still gave me the same error. Deleted node_modules, ran npm install again, and still got the same error. So I deleted the whole project and started all over again. This time it worked.
@timdeschryver the versions are
as written in one of the above comments and the 5.6.0 seems to support
package-lock.jsonwhich is strange…Hi @timdeschryver, I’m following exactly the same steps you mentioned. I would like to try the same in another machine. I let you know what’s the result of that.
EDIT: My current Node and NPM version are: