Contentlayer causes build errors
Unanswered
Minskin posted this in #help-forum
MinskinOP
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 = {
.......code here..........
}
module.exports = withContentlayer(nextConfig);
How do i solve this?
"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 = {
.......code here..........
}
module.exports = withContentlayer(nextConfig);
How do i solve this?