Tal Sofer
10/26/2021, 7:26 AMwebui % npm i react-diff-viewer
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: lakefs-ui@0.1.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! react@"^17.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.3.0 || ^16.0.0" from react-diff-viewer@3.1.1
npm ERR! node_modules/react-diff-viewer
npm ERR! react-diff-viewer@"*" 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.
npm ERR!
Is this safe to use the --legacy-peer-deps
flag to resolve this? reading about this make me suspect that it can lead to potential conflicts in the future. has anyone ran into a similar error?Tal Sofer
10/26/2021, 7:28 AMBarak Amar
Barak Amar
Tal Sofer
10/26/2021, 9:18 AMwebui % npm info react-diff-viewer peerDependencies
{ react: '^15.3.0 || ^16.0.0', 'react-dom': '^15.3.0 || ^16.0.0' }
I found this issue https://github.com/praneshr/react-diff-viewer/issues/118 and this (un-merged) pr https://github.com/praneshr/react-diff-viewer/pull/125 which addresses it.
How do you suggest to proceed from here? Also, looking at https://github.com/praneshr/react-diff-viewer/blob/v3.1.1/package.json, what sections should I look into to identify dependency conflicts?Barak Amar
Barak Amar
Tests pass locally when using React 17, though you have to install @wojtekmaj/enzyme-adapter-react-17 as an enzyme adapter in order to get them to work. (Enzyme doesn't yet officially support React 17).
Barak Amar
Tal Sofer
10/26/2021, 12:59 PMwebui % npm i react-diff-viewer --save --legacy-peer-deps
added 23 packages, and audited 865 packages in 5s
69 packages are looking for funding
run `npm fund` for details
29 vulnerabilities (3 moderate, 26 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
check if specific package code should be used to have the control workLooking into this one, will update here