seek-oss / sku

Front-end development toolkit

Home Page:https://seek-oss.github.io/sku

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unmet peer dependency for react 16 from seek-style-guide

davidmason opened this issue · comments

Following CONTRIBUTING.md, the instructions fail at npm install because seek-style-guide only accepts React 16 a peer dependency. Although it is deprecated, the quickest fix may work just to add || ^17.0.0 to seek-style-guide's react dependencies (and update to use that version). I'm happy to submit a PR with that change if it is appropriate.

The long-term fix is of course to replace the usages of seek-style-guide with equivalents from braid-design-system (if they exist). It looks like only Text from seek-style-guide/react is referred to in the codebase.

If there are existing sku projects that have been built up using seek-style-guide then it may not be sensible to remove the dependency until a solid migration path is provided.

Here is the output from npm install. Note that npm install -f succeeds.

$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: sku@11.6.2
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   dev react@"^17.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.3.0" from seek-style-guide@42.0.0     
npm ERR! node_modules/seek-style-guide
npm ERR!   dev seek-style-guide@"^42.0.0" 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 C:\Users\drdma\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\drdma\AppData\Local\npm-cache\_logs\2022-11-27T23_45_15_212Z-debug-0.log

Seek style guide has been archived and its use discouraged for a long time now, having been replaced by Braid, so there's not really any good reason to add a react 16 peer dep to it. It's quite close to 0 usage internally, so we may well remove support for it entirely at some point. At this point in time it's safe to ignore the warning. Also, the contribution guide is very out of date, and sku now uses yarn as its package manger, so you'll likely have a better installation experience using that instead of npm. :)

seek-style-guide has been removed as a dependency #803, so this warning should no longer occur.