I've encountered an issue while trying to run my local Next.js project (v 12.2.2). The dev script isn't behaving as expected even after installing all necessary dependencies. I'm struggling to identify the root cause of this problem.
Upon running the script, the terminal displays the following message:
https://i.sstatic.net/I7tFo.png
error - Please check your GenerateSW plugin configuration: [WebpackGenerateSW] 'reactStrictMode' property is not expected to be here. Did you mean property 'exclude'?
Here's the content of the next.config.js
file:
const withPWA = require("next-pwa");
module.exports = withPWA({
reactStrictMode: true,
webpack5: true,
webpack: (config) => {
config.resolve.fallback = { fs: false };
return config;
},
pwa: {
dest: "public",
register: true,
disable: process.env.NODE_ENV === "development",
},
images: {
domains: ["pbs.twimg.com", "img.icons8.com", "gateway.moralisipfs.com", "ipfs.moralis.io", "lh3.googleusercontent.com", "www.artnews.com"],
},
// for running with docker
output: "standalone",
});
And here's the package.json
file snippet:
{
"name": "musixverse-client",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"postbuild": "next-sitemap"
},
"dependencies": {
"@headlessui/react": "^1.6.6",
"@heroicons/react": "^1.0.5",
"@walletconnect/web3-provider": "^1.7.8",
"@web3auth/web3auth": "^1.1.1",
...
},
"node-version": "16.17.0",
"npm-version": "8.19.0"
}