phillipsnick / nickphillips.co

Source for nickphillips.co
MIT License
0 stars 0 forks source link

Chef - Install package.json dependencies #49

Closed phillipsnick closed 9 years ago

phillipsnick commented 9 years ago

Tried installing with

execute "npm install" do
  cwd "/vagrant"
  command "npm install"
  user "vagrant"
  group "vagrant"
end

But according to this post http://serverfault.com/a/556554, the best way which works seems to be

execute "npm install" do
  command "su vagrant -l -c 'cd /vagrant && npm install'"
end