Missing peer dependencies

dev27 picture dev27 · May 2, 2018 · Viewed 39.5k times · Source

I am new to npm and angular projects, and I am using [email protected] in my package.json. When I do npm install, I get the following error -

[email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself. 

Does this mean that I need to add [email protected] - 3 to my package.json under peerDependencies section, apart from installing it locally with no-save option?

Also, do we need to install this missing peer dependency on the build server as well? Or can it be ignored?

Answer

4ndt3s picture 4ndt3s · May 2, 2018

Simply install the dependency yourself:

npm install [email protected] --save

Although --save is optional I recommend to put it, so the next time you simply can type only npm install and both bootstrap and jquery will be installed. You can read about peer dependencies on npm documentation.