Installing NPM and "sudo: a password is required" -- during deploy?

I’ve setup my staging server with ansible, no problem – but when I go to deploy I get the following error:

TASK [deploy : Run npm install] ************************************************
System info:
  Ansible; Darwin
  Trellis at "WP 4.6 Compat: set WP_HOME/SITEURL directly"
sudo: a password is required

fatal: []: FAILED! => {"changed": false, "failed": true, "module_stdout": "", "parsed": false}
        to retry, use: --limit @deploy.retry

Why would Trellis want/expect a sudo password from the web account during provisioning? (I think it’s trying to install npm globally) My other trellis sites have no issues provisioning, and I’m at a loss for an explanation, let alone a solution to this.

According to changelog, I’m here:


  • WP 4.6 Compat: set WP_HOME/SITEURL directly (#647)
  • Create WordPress php-fpm conf after web_root exists (#642)
  • Fix #637 - Fix condition for permalink structure task (#643)
  • Fix #639 - WP 4.6 compatibility: update WP-CLI to 0.24.1 (#640)

Trellis doesn’t have anything npm related out of the box. Please share the changes that you’ve made that are trigging this error.