Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ayc0/mdx2-yarn3
https://github.com/ayc0/mdx2-yarn3
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ayc0/mdx2-yarn3
- Owner: Ayc0
- Created: 2022-08-02T06:15:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-05T09:47:07.000Z (over 2 years ago)
- Last Synced: 2024-10-11T20:44:35.695Z (about 1 month ago)
- Language: JavaScript
- Size: 2.31 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mdx2-yarn3
This repo tries to highlight a bug with yarn and ESM (included by @mdx-js/loader)
## Node 18
### ESM disabled
When I set `pnpEnableEsmLoader: false` in `.yarnrc.yml`, I have the following error `ERR_MODULE_NOT_FOUND` with also a weird stack trace:
![ERR_MODULE_NOT_FOUND](public/node-18-esm-disabled.png)
### ESM enabled
When I set `pnpEnableEsmLoader: true` in `.yarnrc.yml`, I have the following error `ERR_LOADER_CHAIN_INCOMPLETE`:
![ERR_LOADER_CHAIN_INCOMPLETE](public/node-18-yarn-3-2-1-esm-enabled.png)
After upgrading yarn to the v3.2.2, it works again:
![it compiles with node 18 and yarn v3.2.2](public/node-18-yarn-3-2-2-esm-enabled.png)
## Node 16 & ESM enabled
### Yarn v3.2.2
It compiles properly:
![it compiles with node 16 and yarn v3.2.2](public/node-16-yarn-3-2-2-esm-enabled.png)
## Full outputs
You can check the [CI runs](https://github.com/Ayc0/mdx2-yarn3/runs/7688799378) to output in different Node/yarn versions and with ESM enabled/disabled.