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) i 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.