# Ansible hanging on the first npm update

**URL:** <https://forum.ansible.com/t/ansible-hanging-on-the-first-npm-update/19882>\
**Category:** Ansible Project\
**Created:** [November 28, 2015, 6:12am UTC](https://forum.ansible.com/t/ansible-hanging-on-the-first-npm-update/19882 "2015-11-28T06:12:06Z")\
**Posts on this page:** 1\
**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, 6:12am UTC](https://forum.ansible.com/t/ansible-hanging-on-the-first-npm-update/19882/1 "2015-11-28T06:12:06Z")

</div>

Hi,

the first time i run this ansible task in the playbook it hangs. I have to go and ssh into the server run npm install manually and after that it works smoothly. Any workaround to get this working?

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

app\_repo\_path: /var/www/myapp

A few more details would be  
ansible version - 1.9.4  
The cloud I’m deploying to is Rackspace

I have tried putting different values to **poll** and **async** , but its still the same.

Is there any workaround to this? Does anybody use ansible to deploy their node apps in production(using the ansible npm module instead of shell)? If so can anybody share a bit of code to help me through?

Thanks in advance,
