webviewer-ui icon indicating copy to clipboard operation
webviewer-ui copied to clipboard

[Bug] npm install failed

Open TiansuYu opened this issue 1 year ago • 1 comments

WebViewer version 8.9

Seen behavior npm install returns the following error message:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
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@"^16.0.0-0" from [email protected]
npm ERR! node_modules/react-swipeable
npm ERR!   react-swipeable@"^5.5.1" 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.

Seems like there are dependency conflicts in your dependency tree, please update or pin some of your libs to a specific version to fix this.

The expected behavior npm install should install the app without problems.

Steps to reproduce npm install

TiansuYu avatar Oct 01 '22 12:10 TiansuYu

Hello @TiansuYu,

I am not able to repro this on a fresh install of 8.9 - I am using the following:

node v16.14.0
npm 8.3.1

We have had some users experience this and recommended using --legacy-peer-deps, starting in NPM 8 there were changes with how the dependencies are installed - more about that here.

bollain avatar Oct 03 '22 17:10 bollain

Thanks for the help. npm install --legacy-peer-deps works quite well for me.

TiansuYu avatar Oct 19 '22 07:10 TiansuYu