twobin/react-lazyload

Installation with react 17 fails

gkpo opened this issue · 3 comments

gkpo commented

I created a simple test project with react and react-dom.

Here's my package.json:

{
  "name": "test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "react": "^17.0.1",
    "react-dom": "^17.0.1"
  }
}

Then running the command npm install react-lazyload fails

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: test@1.0.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from react-lazyload@3.1.0
npm ERR! node_modules/react-lazyload
npm ERR! react-lazyload@"*" 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.

Works now with react-lazyload 3.2.0, so this could be closed?

Hahet commented

I meet the same problem in react-lazyload@ 3.2.0
image

I meet the same problem in react-lazyload@ 3.2.0 image
Switch Nodejs version to 14 and try again