[SOLVED] NoMoralisContextProviderError

@cryptokid you have any idea why I’m getting this error:

"NoMoralisContextProviderError: Make sure to only call useMoralis within a "

anytime I try to use from @web3uikit/web3?

You need to have your code wrapped in MoralisProvider to initialize the sdk

I already did that…

The error pops up when I use ConnectButton from web3uikit

You can look at this issue raised here.

Yea I’ve looked at, even implemented the suggestions they made, still didn’t work

Can you post your package.json. What did you try?

Try installing [email protected] and [email protected] in a new React (CRA) project, all installed with npm.

“dependencies”: {
@chakra-ui/icons”: “^2.0.6”,
@chakra-ui/react”: “^2.2.4”,
@emotion/react”: “^11”,
@emotion/styled”: “^11”,
@fortawesome/fontawesome-svg-core”: “^6.1.1”,
@fortawesome/free-regular-svg-icons”: “^6.1.1”,
@fortawesome/free-solid-svg-icons”: “^6.1.1”,
@fortawesome/react-fontawesome”: “^0.2.0”,
“framer-motion”: “^6”,
“magic-sdk”: “^9.0.0”,
“moralis”: “1.11.0”,
“next”: “12.2.0”,
“particles-bg”: “^2.5.5”,
“react”: “18.2.0”,
“react-dom”: “18.2.0”,
“react-moralis”: “1.3.5”,
“react-responsive-carousel”: “^3.2.23”,
@web3uikit/web3” :"^0.1.5",
@web3uikit/core” :"^0.1.5",
@web3uikit/icons”:"^0.1.5"
}

It’s a next.js project and I’m using yarn as the package manager

thanks @alex, using npm worked…

1 Like