Cannot find module angular2-flash-messages
I am trying to use angular2-flash-messages but getting Cannot find module angular2-flash-messages.
Followed installation steps from https://github.com/moff/angular2-flash-messages.
Attaching my app.module.ts-
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import {RouterModule, Routes} from '@angular/router';
import { AngularFireModule, AuthProviders, AuthMethods} from 'angularfire2';
import {FirebaseService} from './services/firebase.service';
import {FlashMessagesModule} from 'angular2-flash-messages';
import { AppComponent } from './app.component';
import { HomeComponent } from './components/home/home.component';
import { ListingsComponent } from './components/listings/listings.component';
import { NavbarComponent } from './components/navbar/navbar.component';
import { ListingComponent } from './components/listing/listing.component';
import { AddListingComponent } from './components/add-listing/add-listing.component';
import { EditListingComponent } from './components/edit-listing/edit-listing.component';
const appRoutes: Routes = [
{path:'', component:HomeComponent},
{path: 'listings', component:ListingsComponent},
{path:'listing/:id', component:ListingComponent},
{path: 'add-listing', component:AddListingComponent}
]
@NgModule({
declarations: [
AppComponent,
HomeComponent,
ListingsComponent,
NavbarComponent,
ListingComponent,
AddListingComponent,
EditListingComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
FlashMessagesModule,
RouterModule.forRoot(appRoutes)
],
providers: [FirebaseService],
bootstrap: [AppComponent]
})
export class AppModule { }
And here'e the error:
ERROR in C:/Users/user/Downloads/Compressed/proplistings_part_4/src/app/components/navbar/navbar.component.ts (3,36): Cannot find module 'angular2-fla
sh-messages'.
ERROR in C:/Users/user/Downloads/Compressed/proplistings_part_4/src/app/app.module.ts (8,35): Cannot find module 'angular2-flash-messages'.
ERROR in C:/Users/user/Downloads/Compressed/proplistings_part_4/src/app/app.module.ts (8,35): Cannot find module 'angular2-flash-messages'.
Can someone help here.
@ATakaSKY do you use SystemJS?
The same error watting you reply.
I was having the same issue, after fresh installation and I found that
index.d.ts is missing in new installs, just create the file in node_modules/angular2-flash-messages and add export * from './module/index';
Your import should be like this: import {FlashMessagesModule} from 'angular2-flash-messages/module';
Thanks everyone for replying.
Particularly @GabrielAmazonas, thanks man. Got it working now. But their documentation still show its import without the /module. Any views on that.
Hello, @ATakaSKY , I've updated the package - install new version and let me know how it goes now. Check SystemJS config guide in readme.md, if you use it.
@ATakaSKY, @tuanrobe1989 do you still experience the same issue using latest package version?
@moff : It still hs problem
Cannot build the angular project.

on version angular 5 , FlashMessages Latest version
Raj
@rjankathi please post here contents of your package.json and tsconfig.json files
@moff: Please find the below screen shots
tsconfig.json
package.json

changed back to ng Version 4 as well (in the above) No luck :(
I'm still having this issue. And none of the solutions outlined above have worked for me.
ANYONE HAVE A SOLUTION TO FIX THIS ERRORS: ERROR in src/app/app.module.ts(5,35): error TS2307: Cannot find module 'angular2-flash-messages/module'. src/app/app.module.ts(7,35): error TS2307: Cannot find module 'angularfire2'. src/app/app.module.ts(8,37): error TS2307: Cannot find module 'angularfire2/database'. src/app/app.module.ts(9,33): error TS2307: Cannot find module 'angularfire2/auth'. src/app/components/add-client/add-client.component.ts(2,38): error TS2307: Cannot find module 'angular2-flash-messages'. src/app/components/client-details/client-details.component.ts(3,38): error TS2307: Cannot find module 'angular2-flash-messages'. src/app/components/edit-client/edit-client.component.ts(3,38): error TS2307: Cannot find module 'angular2-flash-messages'. src/app/components/login/login.component.ts(2,38): error TS2307: Cannot find module 'angular2-flash-messages'. src/app/components/navbar/navbar.component.ts(2,38): error TS2307: Cannot find module 'angular2-flash-messages'. src/app/components/register/register.component.ts(2,38): error TS2307: Cannot find module 'angular2-flash-messages'. src/app/components/settings/settings.component.ts(4,38): error TS2307: Cannot find module 'angular2-flash-messages'. src/app/guards/auth.guard.ts(4,33): error TS2307: Cannot find module 'angularfire2/auth'. src/app/services/auth.service.ts(2,33): error TS2307: Cannot find module 'angularfire2/auth'. src/app/services/client.service.ts(2,87): error TS2307: Cannot find module 'angularfire2/database'.
'angular2-flash-messages/module' This also doesn't working along with 'angular2-flash-messages'(a/c to official documentation)
npm install angular2-flash-messages --save