wooorm / xdm

Just a *really* good MDX compiler. No runtime. With esbuild, Rollup, and webpack plugins
http://wooorm.com/xdm/
MIT License
595 stars 18 forks source link

Add `--legacy-peer-deps` to `.npmrc` #80

Closed remcohaszing closed 3 years ago

remcohaszing commented 3 years ago

npm is having issues resolving peer dependencies. This is a warning using legacy peer deps, but an error when using the new peer dependency behaviour in npm 7.

This is a local development issue only.

remcohaszing commented 3 years ago
$ npm i                
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: xdm@2.0.2
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   dev react@"^17.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.13.1" from @mdx-js/react@2.0.0-next.8
npm ERR! node_modules/@mdx-js/react
npm ERR!   dev @mdx-js/react@"2.0.0-next.8" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/remco/.cache/npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/remco/.cache/npm/_logs/2021-09-02T19_26_22_331Z-debug.log

I don’t think this is worth the trouble. The issue exists with some dev dependencies. This changes nothing for users.

wooorm commented 3 years ago

Oh I didn't know you could add that to an .npmrc, nice!