I am getting warning in Next.js from webpack. It's just showing warning but cause not any error. The warning is like this:
[webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Node.js doesn't offer a (nice) 
 way to introspect the ESM dependency graph yet.

I'm using
const User = ({ userList }) => {
  const [ userId, setUserId] = useState('1');
  const { data, status } = useQuery(['user', userId], async ()=> {
    const res = await fetch(`https://jsonplaceholder.typicode.com/users/${userId}`);
    return res.json();
  }, {
    staleTime: Infinity,
    cacheTime: Infinity
  } );
  return (
      <input type="number" onChange={e=>setUserId(e.target.value)} />
  )
};
export const getStaticProps = async (ctx) => {
  const { data } = await axios.get('https://jsonplaceholder.typicode.com/users');
  return {
    props: {
      userList: data
    }
  }
}
and _app.tsx file like this:
const queryClient = new QueryClient()
function MyApp({ Component, pageProps }) {
  return(
    <QueryClientProvider client={queryClient}>
      <Component {...pageProps} />
    </QueryClientProvider>
  )
}
Please help me to understand this error.
I was able to add a next.config.js file with the following and it suppressed the message. See next docs https://nextjs.org/docs/messages/webpack5
module.exports = {
  future: {
    webpack5: true,
  },
}
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With