I am getting TypeError and I took this code from moralis documentation also I have attached the error image

TypeError: (0 , wagmi__WEBPACK_IMPORTED_MODULE_1__.createClient) is not a function at eval (webpack-internal:///./pages/_app.js:27:67) { page: ‘/’

import { createClient, configureChains, WagmiConfig } from “wagmi”;
import { publicProvider } from “wagmi/providers/public”;
import { SessionProvider } from “next-auth/react”;
import { mainnet } from “wagmi/chains”;

const { provider, webSocketProvider } = configureChains(
[mainnet],
[publicProvider()]
);

const client = createClient({


provider,
webSocketProvider,
autoConnect: true,
});

function MyApp({ Component, pageProps }) {
return (


<Component {…pageProps} />


);
}

export default MyApp;

hi, can you please the link to the tutorial that you are following? So we can test and check with our team


Metamask Authentication

I have COPIED THE SAME CODE IN MORALIS DOCUMENTAION BUT IT IS GIVING ME ERROR

Hi @ravi12

Can you once verify if all the steps are matching with the steps in docs, as the docs has the latest code. Make you to match the package versions mentioned on the docs.

1 Like