Category : next.js

I’m using NextAuth, and in that I’m trying to create a custom signin page, as per the example given in their documentation. It’s a .ts file. import { getProviders, signIn } from ‘next-auth/client’ export default function SignIn({ providers }) { return ( <> {Object.values(providers).map(provider => ( <div key={provider.name}> <button onClick={() => signIn(provider.id)}>Sign in with {provider.name}</button> ..

Read more

I remove @nextreact-refresh-utils but show aging : Browserslist: caniuse-lite is outdated. Please run: npx [email protected] –update-db Defining routes from exportPathMap (node:5892) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘tap’ of undefined at C:_PROJECTbimeshow-master19-02-1400node_modules @nextreact-refresh-utilsReactRefreshWebpackPlugin.js:100:61 at SyncHook.eval [as call] (eval at create (C:_PROJECTbimeshow-master19-02-1400node_modulesnextnode_modulestapablelibHookCodeFactory.js:19:10), :7:1) Source: Ask Javascript..

Read more

I’m creating a whatsapp clone using next.js. On the first load of app i’m getting this error. Warning: Expected server HTML to contain a matching <div> in <div>. at div at O (http://localhost:3000/_next/static/chunks/pages/_app.js?ts=1621219033615:37232:19450) at div at Paper (http://localhost:3000/_next/static/chunks/pages/chat.js?ts=1621219033615:45091:23) at WithStyles (http://localhost:3000/_next/static/chunks/pages/chat.js?ts=1621219033615:64751:31) at div at Drawer (http://localhost:3000/_next/static/chunks/pages/chat.js?ts=1621219033615:33839:29) at WithStyles (http://localhost:3000/_next/static/chunks/pages/chat.js?ts=1621219033615:64751:31) at SideBar (http://localhost:3000/_next/static/chunks/pages/chat.js?ts=1621219033615:67329:75) at div at ..

Read more

I have grabbed this snippet from useSWR axios example. import useSWR from ‘swr’; import axios from ‘axios’; const useRequest = (request, { initialData, …config } = {}) => useSWR( request && JSON.stringify(request), () => axios(request || {}).then((response) => response.data), { …config, initialData: initialData && { status: 200, statusText: ‘InitialData’, headers: {}, data: initialData, }, } ..

Read more