Reputation: 21
When I'm trying to implement contentlayer in my nextjs app, I'm facing build errors:
web:build: TypeError: Cannot destructure property 'ConnectionOptionsReader' of 'i(...)' as it is undefined.
It mainly happens when I'm adding the following (which is necessary) in next.config.js:
const { withContentlayer } = require("next-contentlayer");
const nextConfig = {
`````````All of my code````````````
}
module.exports = withContentlayer(nextConfig);
I'm unsure what to do, it's supposed to be working fine but something seems wrong, thanks ahead.
Upvotes: 0
Views: 89