Skarf
Skarf

Reputation: 21

NextJS, contentlayer causes build errors

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

Answers (0)

Related Questions