cookies icon indicating copy to clipboard operation
cookies copied to clipboard

Error during build Generic type 'ɵɵFactoryDef' requires 2 type argument(s).

Open kamilogerto2 opened this issue 4 years ago • 11 comments

Hey! :) It look like the "@angular/compiler-cli": "9.0.0" is not compatible with the newest version. I am recieving the error:

`ERROR in node_modules/@ngx-utils/cookies/src/cookies-options.service.d.ts:11:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 2 type argument(s).

11 static ɵfac: i0.ɵɵFactoryDef<CookiesOptionsService>; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@ngx-utils/cookies/src/cookies.service.d.ts:22:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 2 type argument(s).

22 static ɵfac: i0.ɵɵFactoryDef<CookiesService>; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/@ngx-utils/cookies/src/browser/browser-cookies.service.d.ts:14:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 2 type argument(s).

14 static ɵfac: i0.ɵɵFactoryDef<BrowserCookiesService>; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `

It's possible to upgrade to newest version?

kamilogerto2 avatar Apr 16 '20 07:04 kamilogerto2

Same error for me.

manueltg89 avatar Apr 17 '20 07:04 manueltg89

I have the same issue.

mfsenturk avatar Apr 17 '20 19:04 mfsenturk

same here

natqe avatar Apr 18 '20 21:04 natqe

Hi! I was having this issue too, so I finally decided to create port of this library. It works exactly same as this library, but it's builded as Angular library with Angular CLI v 9.1. So you can use it instead of this one to prevent errors like these.

I'll mark it as deprecated as soon as this library will be updated.

https://www.npmjs.com/package/ngx-utils-cookies-port

junekpavel avatar Apr 20 '20 12:04 junekpavel

Hey guys. Due to time - I changed lib to ngx-cookie-service and it works perfectly. cc @manueltg89 @mfsenturk @natqe @junekpavel

kamilogerto2 avatar Apr 20 '20 14:04 kamilogerto2

Hey guys. Due to time - I changed lib to ngx-cookie-service and it works perfectly. cc @manueltg89 @mfsenturk @natqe @junekpavel

I've tried ngx-cookie-service, but it doesn't work with SSR.

junekpavel avatar Apr 20 '20 15:04 junekpavel

@junekpavel For now we are using cookies only on the frontend side - that's why probably I didn't detect that :/

kamilogerto2 avatar Apr 21 '20 06:04 kamilogerto2

same error no news?

Spawnrad avatar Jun 24 '20 15:06 Spawnrad

same error in angular 9.1.0

devangptechuz avatar Jul 28 '20 14:07 devangptechuz

have same error angular v10.1.0

Parsa-Sedigh avatar Dec 05 '20 15:12 Parsa-Sedigh

I deleted the node_modules and reinstall, and everything was back to normal.

matimumbino avatar Dec 23 '20 06:12 matimumbino