I'm running into an error when running pnpm contentlayer build in an attempt to generate output from markdown files. The error I'm getting is from node_modules and I can't understand what I need to do to fix this.
Full error (the file location is listed within node_modules):
import { ConsoleSpanExporter, SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
^^^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'ConsoleSpanExporter' not found. The requested module '@opentelemetry/sdk-trace-base' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@opentelemetry/sdk-trace-base';
const { ConsoleSpanExporter, SimpleSpanProcessor } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)```
Thank you for any help, I've been stuck with this error for the past hours and have gotten nowhere.
For reference, my repo can be found here (the relevant code is within the branch linked): <https://github.com/brianschnee/portfolio-sleek/tree/mdx-refactor>