[SOLVED] I give up. ERROR in ./node_modules/react-moralis/lib/index.esm.js

i keep getting this awful error, i thought it was caused by myself so I tried to start a react project from scratch and see when the problem was introduced.

To my surprise I started with create-react-app, then added chakra UI, and in the exact moment I added moralis and moralis react with its provider in my index.js BOOM it trigger the error

this started to appear.

this is my package json

{

  "name": "bla",

  "version": "0.1.0",

  "private": true,

  "dependencies": {

    "@chakra-ui/icons": "^2.0.6",

    "@chakra-ui/react": "^2.2.6",

    "@emotion/react": "^11.10.0",

    "@emotion/styled": "^11.10.0",

    "@testing-library/jest-dom": "^5.16.5",

    "@testing-library/react": "^13.3.0",

    "@testing-library/user-event": "^13.5.0",

    "framer-motion": "^6.5.1",

    "moralis": "^2.0.1",

    "react": "^18.2.0",

    "react-dom": "^18.2.0",

    "react-moralis": "^1.4.1",

    "react-scripts": "5.0.1",

    "web-vitals": "^2.1.4"

  },

  "scripts": {

    "start": "react-scripts start",

    "build": "react-scripts build",

    "test": "react-scripts test",

    "eject": "react-scripts eject"

  },

  "eslintConfig": {

    "extends": [

      "react-app",

      "react-app/jest"

    ]

  },

  "browserslist": {

    "production": [

      ">0.2%",

      "not dead",

      "not op_mini all"

    ],

    "development": [

      "last 1 chrome version",

      "last 1 firefox version",

      "last 1 safari version"

    ]

  }

}

you are sure that you want to use moralis 2.0?

Hey cryptokid what’s up! thanks for being there man.

i found the problem, yea… somehow i went out on vacation a week and when i got back everything was revolutionized! what is this moralis 2.0 !

i found the solution i think: Updating moralis and react-moralis in nextjs app throws a TypeError: Right-hand side of 'instanceof' is not callable

just downgraded both, moralis and react-moralis like that post says