Review of our peerDependencies. They currently break installs of GitLab UI
I've added Gitlab UI to a new project I'm creating and got the following error message:
./node_modules/@gitlab/ui/dist/components/base/icon/icon.js
Module not found: Error: Can't resolve '@gitlab/svgs/dist/icons.json' in '/Users/sambeckham/Sites/gitlab/dashboard/node_modules/@gitlab/ui/dist/components/base/icon'
I also get the following error in the console:
These dependencies were not found:
* @gitlab/svgs/dist/icons.json in ./node_modules/@gitlab/ui/dist/components/base/icon/icon.js
* @gitlab/svgs/dist/icons.svg in ./node_modules/@gitlab/ui/dist/components/base/icon/icon.js, ./node_modules/@gitlab/ui/dist/components/base/toast/toast.js
* pikaday in ./node_modules/@gitlab/ui/dist/components/base/datepicker/datepicker.js
To install them, you can run: npm install --save @gitlab/svgs/dist/icons.json @gitlab/svgs/dist/icons.svg pikaday
They appear to be listed in the peerDependencies
section in package.json
but that wasn't enough to actually install them when I ran yarn add @gitlab/ui
as peerDependencies
aren't automatically installed.
This may be the desired result, but it's certainly annoying. I understand bootstrap being a peerDependency, and maybe even pikaday, but GitLab SVGs probably shouldn't be.