kentcdodds/mdx-bundler

Can't resolve 'pnpapi' in 'node_modules/esbuild/lib'

tienlx97 opened this issue · 0 comments

  • mdx-bundler version: 9.0.1
  • node version: 16.14.2
  • yarn version: 1.22.18

Hi sir ! I'm using yarn monorepo with react webpack + esbuild-loader. Every work fine after I add mdx-bundler to my website. First problem is the error Top-level await is not available in the configured target environment (es2017) -> fix by upgrade target in esbuild-loader to esnext

Then, I run again, it popup new error :
Can't resolve 'pnpapi' in '.../eevee/node_modules/esbuild/lib'
resolve 'pnpapi' in '.../eevee/node_modules/esbuild/lib
Parsed request is a module
using description file: .../eevee/node_modules/esbuild/package.json (relative path: ./lib)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
Field 'browser' doesn't contain a valid alias configuration
resolve as module
/home/.../eevee/node_modules/esbuild/lib/node_modules doesn't exist or is not a directory
/home/.../eevee/node_modules/esbuild/node_modules doesn't exist or is not a directory
/home/.../eevee/node_modules/node_modules doesn't exist or is not a directory