How to Use ‘npm link’ to Develop Sharable Components

If you are working on a node project there may come a point where your app has a dependency on another custom module you have created.
For example, at one of our clients, my colleagues and I are responsible for a shared component called the Search Component. Like many of the ‘shared’ libraries used in this particular project, the Search Component is published to, and accessed from, a private Artifactory repository. It can be inserted anywhere in the application (usually the header), allowing the user to easily search the site’s content and instantly see a results summary.