I have seen similar questions on stackoverflow regarding npm peerDependencies warnings - but none address best practices for actually installing the dependencies. i.e., are we now supposed to save them along with our dependencies and devDependencies? If that's the case, what's the purpose of the peerDependencies in package.json?
After installing some other npm packages, I'm getting a slew of warnings along the lines of:
npm WARN slate-prop-types@0.4.32 requires a peer of slate@>=0.32.0 but none is installed. You must install peer dependencies yourself.
So what I did is set a peerDependencies object in package.json, and include what it's asking for:
...
"peerDependencies": {
"slate": "0.32.0"
},
...
rerun npm i, but the warning still persists.
The warning only goes away when I include the peerDependency within devDependencies or dependencies, which I don't really want to do since it muddies what packages my project directly depends on.
What's the right way to go about this?