You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
7.0.0 and 6.0.2
Link to runnable example
No response
Steps to reproduce
Using bun with a Nextjs 13.5.4 project. Node v18.
Expected behavior
It should work.
Actual behavior
Errors with message:
./contentlayer.config.ts:114:7
Type error: Type '(options?: Readonly<Options> | null | undefined) => (tree: Root, file: VFile) => undefined' is not assignable to type'Pluggable<any[]>'.
Type '(options?: Readonly<Options> | null | undefined) => (tree: Root, file: VFile) => undefined' is not assignable to type'Plugin<any[], any, any>'.
Type '(tree: Root, file: VFile) => undefined' is not assignable to type'void | Transformer<any, any>'.
Type '(tree: Root, file: VFile) => undefined' is not assignable to type'Transformer<any, any>'.
Types of parameters 'file' and 'file' are incompatible.
Type 'import("/Users/loshan/Repos/ltc/foss-ltc/node_modules/vfile/lib/index").VFile' is not assignable to type'import("/Users/loshan/Repos/ltc/foss-ltc/node_modules/rehype-katex/node_modules/vfile/lib/index").VFile'.
Types of property 'messages' are incompatible.
Type 'import("/Users/loshan/Repos/ltc/foss-ltc/node_modules/vfile-message/index").VFileMessage[]' is not assignable to type'import("/Users/loshan/Repos/ltc/foss-ltc/node_modules/rehype-katex/node_modules/vfile/node_modules/vfile-message/lib/index").VFileMessage[]'.
Type 'VFileMessage' is missing the following properties from type'VFileMessage': ancestors, place
112 | rehypeSlug,
113 | rehypeAutolinkHeadings,
> 114 | rehypeKatex,
| ^
115 | [rehypeCitation, { path: path.join(root, 'data') }],
116 | [rehypePrismPlus, { ignoreMissing: true }],
117 | rehypePresetMinify,
error: script "build" exited with code 1
Runtime
Other (please specify in steps to reproduce)
Package manager
npm 8, Other (please specify in steps to reproduce)
OS
Linux, macOS
Build and bundle tools
Next.js
The text was updated successfully, but these errors were encountered:
Welcome @losh11! 👋
Sorry you ran into a spot of trouble.
The issue you share appears to be a typescript error.
Make sure you are running the latest major version of all: remark, rehype, unified, and vfile dependencies.
The error indicates you likely have incompatible major versions installed currently.
Most likely: update all your tools. Raise issues with the ones that are not up to date (this package is up to date). Or add @ts-expect-error, they might just work fine.
Initial checklist
Affected packages and versions
7.0.0 and 6.0.2
Link to runnable example
No response
Steps to reproduce
Using bun with a Nextjs 13.5.4 project. Node v18.
Expected behavior
It should work.
Actual behavior
Errors with message:
Runtime
Other (please specify in steps to reproduce)
Package manager
npm 8, Other (please specify in steps to reproduce)
OS
Linux, macOS
Build and bundle tools
Next.js
The text was updated successfully, but these errors were encountered: