opennextjs-netlify: 10.0.8 breaks plugin (can't read config target)
Describe the bug
We are experimenting with using netlify-plugin-nextjs instead of next-on-netlify in a yarn monorepo. Unfortunately, when we attempt to deploy with the plugin, we get a Your next.config.js must set the "target" property to one of: serverless, experimental-serverless-trace. Update the target property to allow this plugin to run. message. Attached are two screen shots, one of the next.config.js in question, and the second of the message:
As you can see from the message screenshot, it is console logging This file is detected based on the next.config.js console.log statement, so it sees the correct file. I can also confirm that this is working if we use next-on-netlify directly.
Expected behavior Successful deployment
Versions
- Next.js: 10.0.8-canary.10
- plugin (if installed at fixed version): @netlify/plugin-nextjs@2.0.1 via UI install
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 6
- Comments: 20
fixed and released in v3.0.0!
@segheysens thanks stephen!! working on it!! requires a big refactor π
hey! timon, since you already have a next config, the plugin does not and cannot attempt to modify it for you. you need to manually update your config to include target: serverless. this is expected behavior of the plugin and unrelated to the 10.0.8 bug π.
Sent from my iPhone
I think I ran into a similar problem today with deploying next js 10.0.8. Nice work jumping on it so quickly!