Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 10 build problem #74

Open
medbz opened this issue Sep 11, 2020 · 4 comments
Open

Angular 10 build problem #74

medbz opened this issue Sep 11, 2020 · 4 comments

Comments

@medbz
Copy link

medbz commented Sep 11, 2020

Hello , we are currently facing this problem when trying to ng build --prod ,
any solution for this?

ERROR in node_modules/angular-2-local-storage/local-storage.module.d.ts:4:62 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s).
 4     static forRoot(userConfig?: ILocalStorageServiceConfig): ModuleWithProviders; 
@Paradox7208
Copy link

Paradox7208 commented Nov 11, 2020

I have a workaround for this until a fix is added to the package. You can edit the module.d.ts file yourself in node_modules/angular-2-local-storage/local-storage.module.d.ts

static forRoot(userConfig?: ILocalStorageServiceConfig): ModuleWithProviders<LocalStorageModule>;

You simply just need to provide the module as the generic type parameter (line 5 for me).

@surajpravindeshmukh
Copy link

I have a workaround for this until a fix is added to the package. You can edit the module.d.ts file yourself in node_modules/angular-2-local-storage/local-storage.module.d.ts

static forRoot(userConfig?: ILocalStorageServiceConfig): ModuleWithProviders<LocalStorageModule>;

You simply just need to provide the module as the generic type parameter (line 5 for me).

I too did the same but it doesn't work while deploying on an instance.

@surajpravindeshmukh
Copy link

Hello , we are currently facing this problem when trying to ng build --prod ,
any solution for this?

ERROR in node_modules/angular-2-local-storage/local-storage.module.d.ts:4:62 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s).
 4     static forRoot(userConfig?: ILocalStorageServiceConfig): ModuleWithProviders; 

Any luck on finding the solution for this issue?

@Eugeny
Copy link

Eugeny commented Oct 29, 2021

https://www.npmjs.com/package/patch-package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants