Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angular/cli:"1.4.9" - export 'Store' (imported as 'Redux') was not found in 'redux' on build --prod #8

Open
SimonSchillberg opened this issue Mar 13, 2018 · 4 comments

Comments

@SimonSchillberg
Copy link

SimonSchillberg commented Mar 13, 2018

Changing from angular/cli:"1.2.0-beta.1" to angular/cli:"^1.4.9"
and running

ng build --prod

causes the following output:


WARNING in ./src/app/app.component.ts
10:64-75 "export 'Store' (imported as 'Redux') was not found in 'redux'

WARNING in ./src/app/chat-nav-bar/chat-nav-bar.component.ts
15:71-82 "export 'Store' (imported as 'Redux') was not found in 'redux'

WARNING in ./src/app/chat-threads/chat-threads.component.ts
24:72-83 "export 'Store' (imported as 'Redux') was not found in 'redux'

WARNING in ./src/app/chat-window/chat-window.component.ts
40:71-82 "export 'Store' (imported as 'Redux') was not found in 'redux'

ERROR in ng:///path/to/Project/angular2-redux-chat-master/src/app/chat-message/chat-message.component.html (12,8): Property 'sender' does not exist on type 'Message'.

on ng build or npm start everthing works fine.

Why is the reference changing in production / can't be resolved?

I also noticed that all import * as Redux from 'redux'; 'warned' except for the import in app.store.ts .
This is also working when replacing the original import with the otherwise warning import * and referencing to Redux.Store for example.

Any help would be appreciated :)

@rahiakela
Copy link

I am also facing same issue while building the project for production release, If anyone has resolved it then please help me also.Thanks in advance!

@davina777
Copy link

as a workaround you can replace import { State } from 'redux' by import * as Redux from 'redux' and use Redux.Store instead of simply Store and give a try.

@rahiakela
Copy link

Thanks for your reply.
Actualy, I am doing same thing already as you advised.

@rahiakela
Copy link

I have upgraded Angular 4 to Angular 5 and revert back the code from:
Old:
import * as Redux from 'redux';
@Inject(AppStore) private store: Redux.Store
New:
import {Store} from "redux";
@Inject(AppStore) private store: Store

After done it, working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants