I am encountering an error after migrating from contentlayer2 version 0.4.6 to 0.5.3.
Error Details:
TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
at eval (webpack-internal:///(rsc)/./node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js:328:51)
at eval (webpack-internal:///(rsc)/./node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js:1332:5)
at (rsc)/./node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js ([...x]/.next/server/vendor-chunks/react@18.3.1.js:20:1)
at __webpack_require__ ([...x]/.next/server/webpack-runtime.js:33:43)
at eval (webpack-internal:///(rsc)/./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js:4:20)
at (rsc)/./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js ([...x]/.next/server/vendor-chunks/react@18.3.1.js:50:1)
at __webpack_require__ ([...x]/.next/server/webpack-runtime.js:33:43)
at eval (webpack-internal:///(rsc)/./node_modules/.pnpm/mdx-bundler@10.0.3_acorn@8.14.0_esbuild@0.24.0/node_modules/mdx-bundler/dist/client.js:9:44)
at (rsc)/./node_modules/.pnpm/mdx-bundler@10.0.3_acorn@8.14.0_esbuild@0.24.0/node_modules/mdx-bundler/dist/client.js ([...x]/.next/server/vendor-chunks/mdx-bundler@10.0.3_acorn@8.14.0_esbuild@0.24.0.js:30:1)
at __webpack_require__ ([...x]/.next/server/webpack-runtime.js:33:43) {
type: 'TypeError',
page: '/social/blog/how-to-book-train-tickets-for-your-pets'
}
Steps to Reproduce:
In Dev env
Migrate from contentlayer2 version 0.4.6 to 0.5.3.
Run the application.
Visit the page contentlayer implemented route.
Observe the error in the console/logs.
For Prod env
Build fails
Expected Behavior:
The application should run without any errors when visiting the specified page.
Actual Behavior:
Encountering a TypeError indicating an undefined property (ReactCurrentDispatcher).
Issue Summary:
I am encountering an error after migrating from contentlayer2 version 0.4.6 to 0.5.3.
Error Details:
Steps to Reproduce:
Build fails
Expected Behavior:
The application should run without any errors when visiting the specified page.
Actual Behavior:
Encountering a TypeError indicating an undefined property (ReactCurrentDispatcher).
Environment Details:
Node.js version: v20.18.0 Operating System: MacOS Sequoia 15.0.1 Package Manager: pnpm Next.js version: 15.0.2 React version: 18.3.1
package.json:
Additional Context:
PS: Are there known compatibility issues between contentlayer2 version 0.5.3 and React 18?