ngx-source-obfuscation with Angular 13

367 Views Asked by At

I find this error when I try to install ngx-source-obfuscation with Angular 13. Help me out to solve this error

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: (myProject)@0.0.0
npm ERR! Found: [email protected]
npm ERR! node_modules/rxjs
npm ERR!   rxjs@"~7.5.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer rxjs@"^6.5.0" from @srag/[email protected]
npm ERR! node_modules/@srag/ngx-source-obfuscation
npm ERR!   dev @srag/ngx-source-obfuscation@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
3

There are 3 best solutions below

0
On

I have published a fork of the original library that is compatible with Angular 16.

It also uses the latest javascript-obfuscator (4.1.0)

https://github.com/russcarver/ngx-source-obfuscation

0
On

run npm install <dependencyName> --force or npm install <dependencyName> --legacy-peer-deps

This ignores version mismatches and installs the dependency without any issues

0
On

I am having the same issue.In the npm page of the library, documentation tells us that ngc-source-obfuscation's last version was published 2 years ago. And again documentation tells us it is suitable with Angular 8 or higher. Yes I accept it is suitable with Angular 8 or higher but since then Angular released major versions. Now we are at Angular 14. In my opinion owner of the library has never been updated his library.