Skip to content

Example does not work / "Cannot find module 'angular2-redux-store'" #2

Closed
@SeriousM

Description

@SeriousM

Hi!
I read your post about angular2, redux, immutable and I was keen to try it out!
I tried to reference the angular2-redux-store as you've wrote in the readme, but typescript is constantly telling me, that it's unable to find the module, even it exists in the node_modules folder.

I thought I will try your example, because that one has to work, right? Nope, sorry, it doesn't.

Thats the output after starting the example as documented in your readme:

> [email protected] watch D:\github\angular2-redux-store\example
> rm -rf build && mkdir build && tsc -p src -w

src/App.ts(47,27): error TS2339: Property 'dispatch' does not exist on type 'TodoStore'.
src/App.ts(52,15): error TS2339: Property 'subscribe' does not exist on type 'TodoStore'.
src/App.ts(60,20): error TS2339: Property 'dispatch' does not exist on type 'TodoStore'.
src/App.ts(65,32): error TS2339: Property 'dispatch' does not exist on type 'TodoStore'.
src/App.ts(66,32): error TS2339: Property 'dispatch' does not exist on type 'TodoStore'.
src/App.ts(69,32): error TS2339: Property 'dispatch' does not exist on type 'TodoStore'.
src/TodoList.ts(41,20): error TS2339: Property 'dispatch' does not exist on type 'TodoStore'.
src/TodoList.ts(51,20): error TS2339: Property 'dispatch' does not exist on type 'TodoStore'.
src/TodoService.ts(25,16): error TS2322: Type 'Observable<Response>' is not assignable to type 'Observable<List<Todo>>'.
  Type 'Response' is not assignable to type 'List<Todo>'.
    Property 'set' is missing in type 'Response'.
src/store/TodoStore.ts(3,44): error TS2307: Cannot find module 'redux'.
src/store/TodoStore.ts(6,26): error TS2307: Cannot find module 'redux-logger'.
src/store/TodoStore.ts(7,26): error TS2307: Cannot find module 'angular2-redux-store'.
src/store/todoReducers.ts(5,31): error TS2307: Cannot find module 'redux'.
2:08:26 PM - Compilation complete. Watching for file changes.

I'm using windows 10 with a cygwin shell.

Do you know what's the problem is?

Thank you,
Bernhard

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions