Reputation: 85
I have migrated my angular application from version 13 to version 17. When I am trying to do "ng serve" it is throwing below error.
NgxAnalyticsModule.forRoot returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type.
I have followed the ngx-analytics documentation, by adding in app.module.ts as shown in below
app.module.ts
import { NgxAnalyticsModule } from 'ngx-analytics';
import { NgxAnalyticsPiwik } from 'ngx-analytics/piwik';
@NgModule({
declarations: [
...
],
imports: [
...
NgxAnalyticsModule.forRoot([NgxAnalyticsPiwik]),
...
],
declarations: [
...
]
})
package.json
{
"dependencies": {
"@angular/animations": "~17.3.4",
"@angular/cdk": "~17.3.4",
"@angular/common": "~17.3.4",
"@angular/compiler": "~17.3.4",
"@angular/core": "~17.3.4",
"@angular/forms": "~17.3.4",
"@angular/platform-browser": "~17.3.4",
"@angular/platform-browser-dynamic": "~17.3.4",
"@angular/platform-server": "~17.3.4",
"@angular/router": "~17.3.4",
...
...
...
"ngx-analytics": "^4.6.3-patch1",
...
...
...
...
}
}
Any solution for the problem will be appreciated.
Upvotes: 1
Views: 86