Moralis v1 vs v2 , React 18.2 and react-moralis dependency hell

Hi, I tried to integrate uauth-moralis to a React 18.2 based project, updated moralis to moralis-v1, added react-moralis and I am stuck in dependency hell, my dependencies are:

"dependencies": {
    "@react-three/drei": "^9.17.3",
    "@react-three/fiber": "^8.2.1",
    "@uauth/moralis": "^2.2.0",
    "antd": "^4.22.2",
    "aos": "^2.3.4",
    "assert": "^2.0.0",
    "buffer": "^6.0.3",
    "https-browserify": "^1.0.0",
    "moralis-v1": "^1.11.0",
    "os-browserify": "^0.3.0",
    "react": "^18.2.0",
    "react-blockies": "^1.4.1",
    "react-dom": "^18.2.0",
    "react-moralis": "^1.4.0",
    "react-scripts": "5.0.1",
    "stream": "^0.0.2",
    "stream-http": "^3.2.0",
    "three": "^0.143.0",
    "webpack": "4.0"
  },
$ npm install
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   56 more (@ant-design/icons, @ant-design/react-slick, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.1" from [email protected]
npm WARN node_modules/react-moralis/node_modules/use-immer
npm WARN   use-immer@"^0.6.0" from [email protected]
npm WARN   node_modules/react-moralis
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.1" from [email protected]
npm WARN   node_modules/react-moralis/node_modules/use-immer
npm WARN     use-immer@"^0.6.0" from [email protected]
npm WARN     node_modules/react-moralis

changed 1 package, and audited 2030 packages in 3s

does it mean react-moralis and moralis-v1 can be used only for React 17.x based projects? Should I use Moralis 2.0 then? Does it mean that also uauth-moralis should be updated?

Hello, we are checking.

Hey @korrrba!

Please update your react-moralis version to 1.4.1

Let me know how it works :man_mechanic:

3 Likes

is this the old way connecting sdk with moralis

You can read the docs here for using moralis-v1 / react-moralis. If you have any issues or questions, please make a new topic.