Closed sebastiangug closed 4 years ago
Importing it without forRoot and manually adding
{ provide: COOKIES_OPTIONS, useValue: {} },
CookiesOptionsService,
{ provide: CookiesService, useClass: BrowserCookiesService }
then throws:
@ngx-utils/cookies/src/browser/browser-cookies.module.d.ts:3:22 - error TS-996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class
3 export declare class BrowserCookiesModule {
Which must mean ther's something wrong with the way the declaration files are generated.
Copy pasting the source code into a temp subfolder for it to be compiled alongside the rest of the files works but is obviously not a permanent solution.
ERROR in ../../../node_modules/@ngx-utils/cookies/src/browser/browser-cookies.module.d.ts:4:47 - error TS-996005: BrowserCookiesModule.forRoot returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.
Just updated to angular 9-rc7 and this appears (linked to this issue), if someone could fix it and ping me when done (or if a better/active fork exists) thx
Same Issue as @DeepSnowNeeL
we consume a package that has n dep on cookies
I am using the new Angular 9 with Ivy by default and I am also getting the same issue as @DeepSnowNeeL .
Same for me, tried to migrate my app today to Angular 9, and got exactly the same.
Well, I've created a PR with migration to NG9, and updating types in moduleWithProviders, I think, that should help
Most likely the author of this library will not merge that, so, feel free to try to use my fork https://github.com/daniloff200/cookies
@daniloff200 you've understimated him haha
@michaelbats yeah, suddenly appeared, that we live in one city, and I know some folks from his company, so, contacted him and asked for merge
I hope, that in 4.0.1 version all NG9 issues will be fixed, at least, that helped me today with my migration to Angular 9
I'm getting
when trying to import
I've digged a bit into this issue on Ivy's github and it seems that this package does not follow the APF (Angular Package Format);