Error: Could not find a production build in the ‘.next’ directory. Try building your app with ‘next build’ before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id at setupFsCheck (E:crs admin and clientskillonorofffrontendnode_modulesnextdistser
i did run npm run build
but the problem repeating itself but not solving
solution for the problem
2
Answers
Delete the .next folder manually, and then run npm run build again.
It should be something like this:
Check your next config file is correctly set up.
const nextConfig = {
reactStrictMode: true,
}
module.exports = nextConfig
Remove package-lock.json, node_modules, .next folder and files and reinstall.
If the issue persists, try clearing your npm cache and rebuilding.
Thanks