next-config.js
/** @type {import('next').NextConfig} */
module.exports = {
i18n: {
locales: ['en', 'ru'],
defaultLocale: 'en',
},
publicRuntimeConfig: {
API_URL: process.env.API_URL,
},
images: {
domains: ['fakestoreapi.com'],
},
trailingSlash: true,
webpack: (config, { isServer }) => {
const newConfig = { ...config };
if (!isServer) {
newConfig.resolve.fallback.fs = false;
}
return newConfig;
},
};
Next sitemap version - "next-sitemap": "^2.1.15",
next-sitemap.js
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: 'https://box.hedgefun.net/',
generateRobotsTxt: true,
};
Above you can see as I try to use next-sitemap for creating sitemap , I've found solution to add fs to next-config.js file, for webpack 5 . But it show me next issue . How can I fix it ?
node -v
v14.16.0
I'm facing the same issue in Node v12.22.12.
I have solved issue by updating the Node version to v14.18.0
So please update the Node version to v14.18.0 or more
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