deno icon indicating copy to clipboard operation
deno copied to clipboard

Next.js blog template webpack cache resolve error

Open littledivy opened this issue 1 year ago • 1 comments
trafficstars

To reproduce:

  1. mkdir repro && cd repro
  2. deno run -A --unstable npm:degit 'timlrx/tailwind-nextjs-starter-blog'
  3. Convert next.config.js to ESM
  4. npm i
  5. deno 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

littledivy avatar Jan 18 '24 04:01 littledivy

Adding unstable: ["byonm"] in deno.jsonc fixed this error.

littledivy avatar Jan 19 '24 04:01 littledivy

Fixed with DENO_FUTURE

littledivy avatar Apr 20 '24 05:04 littledivy