Whenever I try to run my project, I encounter the following three warnings:
1-
warn - We found some invalid options in your next.config.js file. The property webpack5 is not recognized and may cause issues (allowed properties are: amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack).
2-
warn - Fast Refresh required a full reload. More information available at: https://nextjs.org/docs/basic-features/fast-refresh#how-it-works
3-
warn - Dependency issue with ./node_modules/next-i18next/dist/commonjs/serverSideTranslations.js. The request of a dependency is treated as an expression.
This is how my next.config.js
looks like:
const {i18n} = require('./next-i18next.config')
const withVideos = require('next-videos')
module.exports = withVideos({
reactStrictMode : true,
i18n,
webpack5: true,
webpack: (config) => {
config.resolve.fallback = { fs: false };
return config;
},
})
I also attempted this configuration:
/**
* @type {import('next').NextConfig}
*/
const {i18n} = require('./next-i18next.config')
const withVideos = require('next-videos')
const nextConfig = {
reactStrictMode : true,
i18n,
webpack5: true,
webpack: (config) => {
config.resolve.fallback = { fs: false };
return config;
},
}
module.exports = withVideos(nextConfig)
However, the outcome remained unchanged.