Open
Description
I'm having some trouble getting the pm2 chef install to work. It's been working fine, but seems to have just stopped. I've put the error below and the different attributes I've tried.
Have been able to replicate using test kitchen, and it seems to happen after the original "chef" of the image/box.
Any help would be much appreciated!
Try 1 Attributes
default['pm2']['node_version'] = '6.5.0'
Try 2 Attributes
default['pm2']['node_version'] = '6.5.0'
default['pm2']['npm_version'] = '4.1.1'
Try 3 Attributes
default['pm2']['node_version'] = '6.5.0'
default['pm2']['npm_version'] = '4.1.2'
Recipe: pm2::default
* javascript_runtime[node] action install
* poise_languages_static[/opt/nodejs-6.5.0] action install
* poise_archive[/var/chef/cache/node-v6.5.0-linux-x64.tar.gz] action nothing (skipped due to action :nothing)
* remote_file[/var/chef/cache/node-v6.5.0-linux-x64.tar.gz] action create (up to date)
* directory[/opt/nodejs-6.5.0] action create (up to date)
(up to date)
(up to date)
* node_package[pm2] action install
================================================================================
Error executing action `install` on resource 'node_package[pm2]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of ["/opt/nodejs-6.5.0/bin/node", "/opt/nodejs-6.5.0/bin/npm", "outdated", "--json", "--global"] ----
STDOUT: {
"npm": {
"current": "4.1.1",
"wanted": "4.1.2",
"latest": "4.1.2",
"location": "/opt/nodejs-6.5.0/lib/node_modules/npm"
}
}
STDERR:
---- End output of ["/opt/nodejs-6.5.0/bin/node", "/opt/nodejs-6.5.0/bin/npm", "outdated", "--json", "--global"] ----
Ran ["/opt/nodejs-6.5.0/bin/node", "/opt/nodejs-6.5.0/bin/npm", "outdated", "--json", "--global"] returned 1
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `tap'
/var/chef/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `language_command_shell_out!'
/var/chef/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:222:in `block in language_command_mixin'
/var/chef/cache/cookbooks/poise-javascript/files/halite_gem/poise_javascript/resources/node_package.rb:213:in `npm_shell_out!'
/var/chef/cache/cookbooks/poise-javascript/files/halite_gem/poise_javascript/resources/node_package.rb:128:in `check_package_versions'
/var/chef/cache/cookbooks/poise-javascript/files/halite_gem/poise_javascript/resources/node_package.rb:106:in `load_current_resource'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:78:in `run_action'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block (2 levels) in converge'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `each'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block in converge'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:105:in `converge'
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/pm2/recipes/default.rb
18: node_package pkg do
19: version node['pm2']["#{pkg}_version"] unless node['pm2']["#{pkg}_version"].nil?
20: end
21: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/pm2/recipes/default.rb:18:in `block in from_file'
node_package("pm2") do
package_name "pm2"
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :node_package
cookbook_name "pm2"
recipe_name "default"
version "latest"
parent_javascript javascript_runtime[node]
npm_binary "/opt/nodejs-6.5.0/bin/npm"
timeout 900
end
Platform:
---------
x86_64-linux