# npm with --save-dev flag

**URL:** <https://forum.ansible.com/t/npm-with-save-dev-flag/16913>\
**Category:** Ansible Project\
**Created:** [November 28, 2014, 3:14pm UTC](https://forum.ansible.com/t/npm-with-save-dev-flag/16913 "2014-11-28T15:14:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![juju](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@juju](https://forum.ansible.com/u/juju)\
**Post date:** [November 28, 2014, 3:14pm UTC](https://forum.ansible.com/t/npm-with-save-dev-flag/16913/1 "2014-11-28T15:14:43Z")

</div>

Confused about how to run something like this with ansible ( the --save-dev flag part). Do I manually create a package.json file in my project root directory before using ansible to install the npm package?

```auto
npm install gulp-ruby-sass --save-dev

```

---

<div class="post-metadata">

**Author:** ![Mehul\_Ved](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Mehul\_Ved](https://forum.ansible.com/u/Mehul_Ved)\
**Post date:** [December 1, 2014, 11:22am UTC](https://forum.ansible.com/t/npm-with-save-dev-flag/16913/2 "2014-12-01T11:22:46Z")

</div>

We do build our package.json on developer's machine. And just run npm  
install on the production machine. We're even considering offloading  
this task to CI server and just copy the final build files to the  
production machine as we've had inconsistencies in npm install at  
times and doing it multiple times doesn't make sense in most cases.
