kentcdodds / mdx-bundler

šŸ¦¤ Give me MDX/TSX strings and I'll give you back a component you can render. Supports imports!
MIT License
1.78k stars 75 forks source link

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

Closed tienlx97 closed 2 years ago

tienlx97 commented 2 years ago

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