Question: I have been using nodejs a lot lately but I keep coming up against a similar error. There are a huge amount of projects out there and a lot of them have npm packages, but whenever I attempt `npm install --save some-package` I can't seem to figure out how to use them. I don't mean things like express, or mongoose, which I seem to be able to use just fine. I mean things like Bootstrap, or right now, `masonry-layout`.

For instance I followed the steps on the masonry layout page, and executed the following steps:

`npm install --save masonry-layout`

Then according to the [npm page for masonry-layout](https://www.npmjs.com/package/masonry-layout) I added to following to my general purpose `scripts.js` files (I am keeping small snippets I need in here until I separate code more logically):

```
$('.grid').masonry({
  // options... 
  itemSelector: '.grid-item',
  columnWidth: 200
});

```

However I get the following error in my console on page load:

```
TypeError: $(...).masonry is not a function
    $('.grid').masonry({

```

I get similar problems when I try and use other frontend node modules or projects. Am I missing something? I always just end up using the cdn or installing the files manually and I am getting tired of working that way.

Answer: 
You still need to include those scripts in your page.

Use a good old `<script src="…">` or some module loader. (e.g. [require.js](http://requirejs.org/))
what I did was instead of using masonry package download jQuery masonry script and add it as a "script tag" /js file  

and you can form layout easily in css