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 14 deepmerge warning #229

Open
yuchuan1 opened this issue Jul 7, 2022 · 9 comments · May be fixed by #259
Open

Angular 14 deepmerge warning #229

yuchuan1 opened this issue Jul 7, 2022 · 9 comments · May be fixed by #259
Labels
dependencies Pull requests that update a dependency file

Comments

@yuchuan1
Copy link

yuchuan1 commented Jul 7, 2022

Versions
ngrx-store-localstorage 14.0.0
Angular 14.0.5

Warning: /Users/user/myproject/node_modules/ngrx-store-localstorage/fesm2020/ngrx-store-localstorage.mjs depends on 'deepmerge'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
@BBlackwo BBlackwo added the dependencies Pull requests that update a dependency file label Jul 11, 2022
@kyrolus
Copy link

kyrolus commented Jul 13, 2022

Me too see this warnings and we want and update

@haidar-h
Copy link

Same here.

@dmitrydutin
Copy link

dmitrydutin commented Sep 4, 2022

Similar problem with angular 14.2.0

Warning: ...\node_modules\ngrx-store-localstorage\fesm2020\ngrx-store-localstorage.mjs depends on 'deepmerge'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

@sleez007
Copy link

Hi @BBlackwo,
This problem is still open and I had a similar experience after installing the package. any help on this?

@BBlackwo
Copy link
Collaborator

There are two options to fix this:

  1. Disable the warning https://angular.io/guide/build#configuring-commonjs-dependencies
    • Straightforward. Anyone is free to raise a PR with that change.
  2. Move to another library which uses ESModules
    • More risky and will need a lot of testing
    • This library already moved from lodash to deepmerge in 2019 Try replacing lodash with deepmerge #126
    • Is there a better library than deepmerge that uses ESModules?

@M-a-c-Carter
Copy link

@BBlackwo we'll see there is talk about them adding esm, i'd love to see this move forward, this is kind of out of date with standards there are already 2 libs that added support that are named ts-deepmerge and deepmerge-ts lol

@M-a-c-Carter
Copy link

M-a-c-Carter commented Jun 9, 2023

https://snyk.io/advisor/npm-package/ts-deepmerge has is healthier than the original, and the package size is reduced seems like a really good choice imo. Also this issue was reported back in angular 14 (we're now on angular 16) also this fix seems pretty prescribed and simple?

Neizan93 pushed a commit to Neizan93/ngrx-store-localstorage that referenced this issue Aug 5, 2023
Migrated the deepmerge library to ts-deepmerge for better TypeScript compatibility and enhanced type checking.

fixes btroncone#229
Neizan93 pushed a commit to Neizan93/ngrx-store-localstorage that referenced this issue Aug 5, 2023
Migrated the deepmerge library to ts-deepmerge for better TypeScript compatibility and enhanced type checking.

fixes btroncone#229
Neizan93 pushed a commit to Neizan93/ngrx-store-localstorage that referenced this issue Aug 5, 2023
Migrated the deepmerge library to ts-deepmerge for better TypeScript compatibility and enhanced type checking.

fixes btroncone#229
Neizan93 pushed a commit to Neizan93/ngrx-store-localstorage that referenced this issue Aug 5, 2023
Migrated the deepmerge library to ts-deepmerge for better TypeScript compatibility and enhanced type checking.

fixes btroncone#229
Neizan93 pushed a commit to Neizan93/ngrx-store-localstorage that referenced this issue Aug 5, 2023
Migrated the deepmerge library to ts-deepmerge for better TypeScript compatibility and enhanced type checking.

fixes btroncone#229
Neizan93 pushed a commit to Neizan93/ngrx-store-localstorage that referenced this issue Aug 5, 2023
Migrated the deepmerge library to @bundled-es-modules/deepmerge.

fixes btroncone#229
@Neizan93 Neizan93 linked a pull request Aug 5, 2023 that will close this issue
13 tasks
@Neizan93
Copy link

Neizan93 commented Aug 7, 2023

You can use npm install ngrx-store-localstorage-es to fix the warning until is fixed on 'ngrx-store-localstorage'.

@yigsvnsla
Copy link

You can use npm install ngrx-store-localstorage-es to fix the warning until is fixed on 'ngrx-store-localstorage'.

Could you provide an example?
I have problems being able to use the npm install ngrx-store-localstorage-es dependency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment