# Ansible gets stuck during first npm install

**URL:** <https://forum.ansible.com/t/ansible-gets-stuck-during-first-npm-install/19883>\
**Category:** Ansible Project\
**Created:** [November 28, 2015, 7:50am UTC](https://forum.ansible.com/t/ansible-gets-stuck-during-first-npm-install/19883 "2015-11-28T07:50:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anoop](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@anoop](https://forum.ansible.com/u/anoop)\
**Post date:** [November 28, 2015, 7:50am UTC](https://forum.ansible.com/t/ansible-gets-stuck-during-first-npm-install/19883/1 "2015-11-28T07:50:30Z")

</div>

Hi,

Ansible gets stuck during execution of this task

> - name: install repo packages
> 
> become: yes
> 
> become\_user: deploy
> 
> npm: path={{ app\_repo\_path }} state=present

app\_repo\_path = /var/www/myApp

I’m using ansible version 1.9.4. And deploying to rackspace servers.

For the first time it hangs and I have to ssh into the server and run npm install manually. Is there a workaround to this? Are there anybody out there using ansible for production in deploying nodejs apps using ansible npm module?  
I also face other issues while doing bower install which initially failed as root user cannot install bower packages and many times connection times out in the server while installing thus the task fails. It would be great to know how people handle these issues.

Thanks in advance,

---

<div class="post-metadata">

**Author:** ![Pablo\_Farias\_Navarro](https://avatars.discourse-cdn.com/v4/letter/p/ecc23a/32.png) [@Pablo\_Farias\_Navarro](https://forum.ansible.com/u/Pablo_Farias_Navarro)\
**Post date:** [February 29, 2016, 5:22am UTC](https://forum.ansible.com/t/ansible-gets-stuck-during-first-npm-install/19883/2 "2016-02-29T05:22:57Z")

</div>

I have the exact same problem.

Doing:

- name: update node packages  
npm: path=/my-path

Makes the playbook get stuck, so I have to manually ssh and do npm install :s

---

<div class="post-metadata">

**Author:** ![owen.garland](https://avatars.discourse-cdn.com/v4/letter/o/e8c25b/32.png) [@owen.garland](https://forum.ansible.com/u/owen.garland)\
**Post date:** [April 4, 2016, 11:31am UTC](https://forum.ansible.com/t/ansible-gets-stuck-during-first-npm-install/19883/3 "2016-04-04T11:31:52Z")

</div>

I have ran into this problem too, here is my task:

- name: Install doorman  
npm: name=doorman-proxy version=0.4.1 global=yes  
tags: doorman
