symfony2-vagrant
symfony2-vagrant copied to clipboard
Less install failing
err: /Stage[main]/Dev-packages/Exec[install less using npm]/returns: change from notrun to 0 failed: npm install less -g returned 1 instead of one of [0] at /tmp/vagrant-puppet/manifests/default.pp:25
Same issue:
err: /Stage[main]/Dev-packages/Exec[install less using npm]/returns: change from notrun to 0 failed: npm install less -g returned 1 instead of one of [0] at /tmp/vagrant-puppet/manifests/default.pp:25
Manually executing executing the following on the vagrant box fixed it for me to keep things moving forward:
- sudo dpkg -r node
- sudo apt-get update
- sudo apt-get install -y python-software-properties python g++ make
- sudo add-apt-repository -y ppa:chris-lea/node.js
- sudo apt-get update
- sudo apt-get install nodejs
- sudo npm install less -g
Complete dump:
info: Loading facts in /tmp/vagrant-puppet/modules-0/puppetlabs-stdlib/lib/facter/pe_version.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/puppetlabs-stdlib/lib/facter/puppet_vardir.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/puppetlabs-stdlib/lib/facter/root_home.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/puppi/lib/facter/last_run.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/puppi/lib/facter/puppi_projects.rb info: Applying configuration version '1385251700' notice: /Stage[main]/System-update/Exec[apt-get update]/returns: executed successfully notice: /Stage[main]/Php-setup/Exec[add-apt-repository ppa:ondrej/php5]/returns: executed successfully notice: /Stage[main]/Dev-packages/Exec[install capistrano_rsync_with_remote_cache using RubyGems]/returns: executed successfully notice: /Stage[main]/Php-setup/Exec[apt-get update for ondrej/php5]/returns: executed successfully err: /Stage[main]/Dev-packages/Exec[install less using npm]/returns: change from notrun to 0 failed: npm install less -g returned 1 instead of one of [0] at /tmp/vagrant-puppet/manifests/default.pp:25 notice: /Stage[main]/Apt::Update/Exec[apt_update]/returns: executed successfully notice: /Stage[main]/Dev-packages/Exec[install sass with compass using RubyGems]/returns: executed successfully notice: /Stage[main]/Phpqatools/Pear::Package[Phing]/Package[pear-pear.phing.info-Phing]/ensure: created notice: /Stage[main]/Phpqatools/Pear::Package[PHP_Depend]/Package[pear-pear.pdepend.org-PHP_Depend]/ensure: ensure changed '1.1.2' to 'beta' notice: /Stage[main]/Phpqatools/Pear::Package[PHP_CodeSniffer]/Package[pear-pear.php.net-PHP_CodeSniffer]/ensure: ensure changed '1.4.7' to '1.5.0RC4' notice: /Stage[main]/Phpqatools/Pear::Package[Finder]/Package[pear-pear.symfony.com-Finder]/ensure: ensure changed '2.3.7' to '2.4.0BETA2' notice: /Stage[main]/Composer/Exec[composer self update]/returns: executed successfully notice: /Stage[main]/Phpqatools/Pear::Package[PHP_PMD]/Package[pear-pear.phpmd.org-PHP_PMD]/ensure: ensure changed '1.5.0' to '1.5.1snapshot201311091125' notice: /Stage[main]/Dev-packages/Exec[install capifony using RubyGems]/returns: executed successfully notice: Finished catalog run in 591.61 seconds The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!
puppet apply --verbose --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' --detailed-exitcodes /tmp/vagrant-puppet/manifests/default.pp || [ $? -eq 2 ]
Stdout from the command:
info: Loading facts in /tmp/vagrant-puppet/modules-0/puppetlabs-stdlib/lib/facter/pe_version.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/puppetlabs-stdlib/lib/facter/puppet_vardir.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/puppetlabs-stdlib/lib/facter/root_home.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/puppi/lib/facter/last_run.rb info: Loading facts in /tmp/vagrant-puppet/modules-0/puppi/lib/facter/puppi_projects.rb info: Applying configuration version '1385251700' notice: /Stage[main]/System-update/Exec[apt-get update]/returns: executed successfully notice: /Stage[main]/Php-setup/Exec[add-apt-repository ppa:ondrej/php5]/returns: executed successfully notice: /Stage[main]/Dev-packages/Exec[install capistrano_rsync_with_remote_cache using RubyGems]/returns: executed successfully notice: /Stage[main]/Php-setup/Exec[apt-get update for ondrej/php5]/returns: executed successfully err: /Stage[main]/Dev-packages/Exec[install less using npm]/returns: change from notrun to 0 failed: npm install less -g returned 1 instead of one of [0] at /tmp/vagrant-puppet/manifests/default.pp:25 notice: /Stage[main]/Apt::Update/Exec[apt_update]/returns: executed successfully notice: /Stage[main]/Dev-packages/Exec[install sass with compass using RubyGems]/returns: executed successfully notice: /Stage[main]/Phpqatools/Pear::Package[Phing]/Package[pear-pear.phing.info-Phing]/ensure: created notice: /Stage[main]/Phpqatools/Pear::Package[PHP_Depend]/Package[pear-pear.pdepend.org-PHP_Depend]/ensure: ensure changed '1.1.2' to 'beta' notice: /Stage[main]/Phpqatools/Pear::Package[PHP_CodeSniffer]/Package[pear-pear.php.net-PHP_CodeSniffer]/ensure: ensure changed '1.4.7' to '1.5.0RC4' notice: /Stage[main]/Phpqatools/Pear::Package[Finder]/Package[pear-pear.symfony.com-Finder]/ensure: ensure changed '2.3.7' to '2.4.0BETA2' notice: /Stage[main]/Composer/Exec[composer self update]/returns: executed successfully notice: /Stage[main]/Phpqatools/Pear::Package[PHP_PMD]/Package[pear-pear.phpmd.org-PHP_PMD]/ensure: ensure changed '1.5.0' to '1.5.1snapshot201311091125' notice: /Stage[main]/Dev-packages/Exec[install capifony using RubyGems]/returns: executed successfully notice: Finished catalog run in 591.61 seconds
sudo apt-get install nodejs
I added the following in default.pp which seemed to work ... see "enable ability to install npm packages" $devPackages = [ "vim", "curl", "git", "nodejs", "npm", "capistrano", "rubygems", "openjdk-7-jdk", "libaugeas-ruby" ] package { $devPackages: ensure => "installed", require => Exec['apt-get update'], }
exec { 'enable ability to install npm packages':
command => 'npm config set registry http://registry.npmjs.org/',
require => Package["npm"],
}
exec { 'install less using npm':
command => 'npm install less -g',
require => Package["npm"],
}