Only this worked fro me
// next.config.js
const nextConfig = {
webpack: (config, { isServer }) => {
// Only attempt to resolve fs module on the server side
if (!isServer) {
config.resolve.fallback = {
fs: false,
};
}
return config;
},
};
module.exports = nextConfig;