O'Reilly logo

Meteor: Full-Stack Web Application Development by Marcelo Reyna, Isaac Strack, Fabian Vogelsteller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using npm modules

Node Package Manager (NPM) has thousands of modules available. Knowing how to add an npm module for use in your Meteor project gives you access to all of those modules. This recipe will show you how to do this.

Getting ready

You will need to make sure that you have Meteor and Node/npm installed.

You will also need a project that makes use of a custom-built package. We will be using the project from the Building a custom package recipe, found in this chapter.

How to do it…

We first need to add a reference to the npm package that we would like to add, which in this case is going to be the colors module.

  1. Inside your custom package (the one in the packages/ subfolder of your app), in the package.js file, add an Npm.depends statement to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required