Edit next.config.js
:
module.exports = {
reactStrictMode: true,
swcMinify: true,
}
To enable Turbopack. Edit packages.json
:
{
"scripts": {
"dev": "next dev --turbo"
}
}
Edit packages.json
:
{
"scripts": {
"clean:files": "rm -rf node_modules && rm -rf .next && rm -rf package-lock.json",
"clean:cache": "npm cache clean --force && npm cache verify",
"clean": "npm run clean:files && npm run clean:cache",
"upgrade:latest": "npm run clean && npx npm-check-updates -u && npm install",
"reinstall": "npm run clean && npm install",
},
}
After cleaning the directories and cache, install the dependency packages.
npm run reinstall