deno
deno copied to clipboard
`next-contentlayer` with Next.js not working
To reproduce:
mkdir repro && cd reprodeno run -A --unstable npm:degit 'timlrx/tailwind-nextjs-starter-blog'- Convert
next.config.jsto ESM npm ideno run -A --unstable-byonm ./node_modules/.bin/next dev
In the wall of errors, you'll find:
ConfigReadError (/Users/divy/gh/demo/contentlayer.config.ts): TypeError: Cannot read properties of undefined (reading 'env') at file:///Users/divy/gh/demo/.contentlayer/.cache/v0.3.4/compiled-contentlayer-config-V47B5E7I.mjs?x=1705550689002:58:35
ConfigReadError (/Users/divy/gh/demo/contentlayer.config.ts): TypeError: Cannot read properties of undefined (reading 'env') at file:///Users/divy/gh/demo/.contentlayer/.cache/v0.3.4/compiled-contentlayer-config-V47B5E7I.mjs?x=1705550689011:58:35
Adding an import process from "node:process" in data/siteMetadata.js fixes the issue