Hi,
I suspect the current version of the next.js plugin is causing errors for my site. I would like to downgrade it, but cannot find any information about it online. How can I go about this?
Hi,
I suspect the current version of the next.js plugin is causing errors for my site. I would like to downgrade it, but cannot find any information about it online. How can I go about this?
Hi @HavenRemix,
Thanks for reaching out!
You should be able to revert to a prior version by adding the following to your package.json:
"devDependencies": {
"@netlify/plugin-nextjs": "^4.xx.x"
}
With 4.xx.x
getting changed to the version you want to revert to. You can view the versions here.
can you share your netlify.toml
My netlify.toml
[build]
command = “yarn build”
publish = “.next”
[[plugins]]
package = “@netlify/plugin-nextjs”
“devDependencies”: {
“@netlify/plugin-nextjs”: “^4.37.2”,
}
why netlify when building still take the latest version of plugin to install… please help
Hi @phongvuno1,
Thanks for reaching out!
Did you run npm i @netlify/plugin-nextjs@4.37.2
Also ensure you have:
"devDependencies": {
"@netlify/plugin-nextjs": "^4.37.2"
}
within the package.json
Hi Melvin,
yeah I installed it in dependencies and then devDependencies but it’s not working.
1 issue is that my homepage doesn’t have css, other router like /other render okay.
I have checked the build log in netlify, the package of @netlify/plugin-nextjs is 4.39.0.
Please share your site name.
Based on this, it appears you’ve added the last lines in netlify.toml
as well. They need to be in the package.json
.
oh sorry for let you confuse
My netlify.toml
[build]
command = “yarn build”
publish = “.next”
[[plugins]]
package = “@netlify/plugin-nextjs”
My package.json
“devDependencies”: {
“@netlify/plugin-nextjs”: “^4.37.2”,
}
My nextjs version 11.1.2
but when I test with latest nextjs 13.4.4 it has the same issue, only my landing page is missing css. other pages working fine. it weird…
you can check 2 route here:
You simply need to Publish the current deploy: Deploy details | Deploys | production-client-booknailsalon | Netlify
you had asset optimization enabled in the past, which is now disabled, but you haven’t published the latest deploy. The latest one works fine: Book Salon (64a5a3f8392d6109f1dc0409–production-client-booknailsalon.netlify.app)
Thank for helping, can I know the reason why? did you just help to disable asset optimization?