deno
deno copied to clipboard
Next.js blog template webpack cache resolve error
trafficstars
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:
<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve 'npm:@next/bundle-analyzer' in '/Users/divy/gh/demo'
<w> while resolving 'npm:@next/bundle-analyzer' in /Users/divy/gh/demo as file
<w> at resolve esm file npm:@next/bundle-analyzer
<w> at file dependencies /Users/divy/gh/demo/next.config.js
<w> at file /Users/divy/gh/demo/next.config.js
<w> at resolve commonjs /Users/divy/gh/demo/next.config.js
Adding unstable: ["byonm"] in deno.jsonc fixed this error.
Fixed with DENO_FUTURE