Currently, I am diving into the world of Redux and attempting to integrate it into my Angular 7 project using ng2-redux. However, upon visiting the npm page, I discovered that the recommended approach was to install it with
npm install @angular-redux/store'
. After configuring my app.module file accordingly, an error popped up: error TS2307: Cannot find module 'redux'.
Is there something wrong with how I'm importing it? What could be causing this issue? Despite scouring the internet for solutions, I haven't stumbled upon anything helpful yet. Here's a snippet from my app.module
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { NgRedux, NgReduxModule } from '@angular-redux/store'
import { rootReducer, AppState } from '../app/store';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
constructor(ngRedux: NgRedux<AppState>) {
ngRedux.configureStore(rootReducer, {});
}
}
Below is a glimpse at my package.json:
{
"name": "angular-redux-playground",
"version": "0.0.0",
// Remaining content of package.json goes here...
}