Q: Angular library dependency install automatically I have a angular library and I have that as .tgz file in my local. Now I want to use this library in one of my angular application. Is there a way, by which the dependency of library gets automatically installed when we run npm install (without adding the dependency in package.json).
Example: 
Library depends on bootstrap, @angular/material, etc
In my project, by default I have not added any of the dependency mentioned above that library requires. I am just specifying the "sampleLibrary": "file:./libraries/sample-library.tgz" in package.json. If run npm install, I need to have all the dependency of sampleLibrary to get installed and available in node_modules.

A: You need to list these dependencies under the dependencies key in the package.json file of the sampleLibrary. When you run npm install, NPM builds the dependency tree and installs all of the required modules. You can read more about the algorithm here.
