Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install nodejs 5x #273

Closed
jeff1evesque opened this issue Jan 13, 2017 · 6 comments
Closed

Unable to install nodejs 5x #273

jeff1evesque opened this issue Jan 13, 2017 · 6 comments

Comments

@jeff1evesque
Copy link

jeff1evesque commented Jan 13, 2017

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.4.3
  • Ruby: ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
  • Distribution: ubuntu 14.04
  • Module version: v1.3.0

How to reproduce (e.g Puppet code you use)

$ cd /path/to/projects
$ git clone https://github.com/jeff1evesque/drupal-demonstration.git
$ cd drupal-demonstration
$ vagrant up

What are you seeing

...
==> default: Running provisioner: puppet...
==> default: Running Puppet with environment development...
==> default: Notice: Compiled catalog for drupal-demonstration.com in environment development in 1.31 seconds
==> default: Notice: /Stage[main]/Nodejs::Repo::Nodesource::Yum/File[/etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL]/ensure: defined content as '{md5}98996aced02654a18b463e9893945968'
==> default: Notice: /Stage[main]/Nodejs::Repo::Nodesource::Yum/Yumrepo[nodesource]/ensure: created
==> default: Notice: /Stage[main]/Nodejs::Repo::Nodesource::Yum/Yumrepo[nodesource-source]/ensure: created
==> default: Notice: /Stage[main]/Nodejs::Install/Package[nodejs]/ensure: created
==> default: Error: Execution of '/bin/rpm -e npm-3.10.8-1.6.9.1.4.el7.x86_64' returned 1: error: Failed dependencies:
==> default:    npm = 1:3.10.8-1.6.9.1.4.el7 is needed by (installed) nodejs-1:6.9.1-4.el7.x86_64
==> default: Error: /Stage[main]/Nodejs::Install/Package[npm]/ensure: change from 3.10.8-1.6.9.1.4.el7 to absent failed: Execution of '/bin/rpm -e npm-3.10.8-1.6.9.1.4.el7.x86_64' returned 1: error: Failed dependencies:
==> default:    npm = 1:3.10.8-1.6.9.1.4.el7 is needed by (installed) nodejs-1:6.9.1-4.el7.x86_64
==> default: Notice: /Stage[main]/Nodejs/Anchor[::nodejs::end]: Dependency Package[npm] has failures: true
==> default: Warning: /Stage[main]/Nodejs/Anchor[::nodejs::end]: Skipping because of failed dependencies
==> default: Notice: /Stage[main]/Install_packages/Package[inotify-tools]/ensure: created
==> default: Notice: /Stage[main]/Install_packages/Package[ruby-devel]/ensure: created
==> default: Notice: /Stage[main]/Install_packages/Package[uglify-js]/ensure: created
==> default: Notice: /Stage[main]/Install_packages/Package[node-sass]/ensure: created
==> default: Notice: /Stage[main]/Install_packages/Package[imagemin]/ensure: created
==> default: Notice: /Stage[main]/Create_directories/File[/vagrant/log/]/ensure: created
==> default: Notice: /Stage[main]/Create_directories/File[/vagrant/webroot/sites/all/themes/custom/sample_theme/asset]/ensure: created
==> default: Notice: /Stage[main]/Create_compilers/File[/vagrant/webroot/sites/all/themes/custom/sample_theme/asset/img/]/ensure: created
==> default: Notice: /Stage[main]/Create_compilers/File[imagemin-startup-script]/ensure: defined content as '{md5}767ae1bd7c68702603e33f1278e85325'
==> default: Notice: /Stage[main]/Create_compilers/Exec[dos2unix-systemd-imagemin]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/Exec[dos2unix-bash-imagemin]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/Service[imagemin]/ensure: ensure changed 'stopped' to 'running'
==> default: Notice: /Stage[main]/Create_compilers/Exec[touch-img-files]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/File[/vagrant/webroot/sites/all/themes/custom/sample_theme/asset/css/]/ensure: created
==> default: Notice: /Stage[main]/Create_compilers/File[sass-startup-script]/ensure: defined content as '{md5}e3a8dc1bdf10442142a37da36399fb28'
==> default: Notice: /Stage[main]/Create_compilers/Exec[dos2unix-systemd-sass]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/Exec[dos2unix-bash-sass]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/Service[sass]/ensure: ensure changed 'stopped' to 'running'
==> default: Notice: /Stage[main]/Create_compilers/Exec[touch-scss-files]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/File[/vagrant/webroot/sites/all/themes/custom/sample_theme/asset/js/]/ensure: created
==> default: Notice: /Stage[main]/Create_compilers/File[uglifyjs-startup-script]/ensure: defined content as '{md5}229e6ff3841985095cee0b3c1bd4ad34'
==> default: Notice: /Stage[main]/Create_compilers/Exec[dos2unix-systemd-uglifyjs]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/Exec[dos2unix-bash-uglifyjs]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/Service[uglifyjs]/ensure: ensure changed 'stopped' to 'running'
==> default: Notice: /Stage[main]/Create_compilers/Exec[touch-js-files]: Triggered 'refresh' from 1 events
==> default: Notice: Applied catalog in 73.22 seconds
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
...

Note: the above traceback was taken from jeff1evesque/drupal-demonstration#543.

What behaviour did you expect instead

I expected my configure_compilers.pp to have sufficient logic to install nodejs 5x:

...
## install nodejs dependencies
class install_nodejs_dependencies {
    include stdlib
    include wget
}

## install nodejs: to use npm
class install_nodejs {
    ## set dependency
    require install_nodejs_dependencies

    class { 'nodejs':
        repo_url_suffix => '5.x',
    }
}
...

Any additional information you'd like to impart

Something in the last couple months has changed within my build. Earlier this summer, a vagrant up would install nodejs 5x with no errors (I haven't changed my repository since many months). Somehow, some package dependency must have got updated, and resulted in my build error.

@bastelfreak
Copy link
Member

Hi,
are you really using version v1.3.0 of the modules? This is pretty old, can you test our latest release as well?

@jeff1evesque
Copy link
Author

I updated my Puppetfile:

  • removed treydock/puppet-gpg_key.git
  • updated puppetlabs/puppetlabs-stdlib.git
  • updated voxpupuli/puppet-nodejs.git

which generated the following traceback:

...
==> default: Running provisioner: puppet...
==> default: Running Puppet with environment development...
==> default: Warning: This method is deprecated, please use the stdlib validate_legacy function, with Pattern[]. There is further documentation for validate_legacy function in the README.
==> default:    (at /tmp/vagrant-puppet/modules-ea55768294a9baf075451760390986de/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
==> default: Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README.
==> default:    (at /tmp/vagrant-puppet/modules-ea55768294a9baf075451760390986de/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
==> default: Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::String. There is further documentation for validate_legacy function in the README.
==> default:    (at /tmp/vagrant-puppet/modules-ea55768294a9baf075451760390986de/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
==> default: Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Array. There is further documentation for validate_legacy function in the README.
==> default:    (at /tmp/vagrant-puppet/modules-ea55768294a9baf075451760390986de/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
==> default: Notice: Compiled catalog for drupal-demonstration.com in environment development in 1.31 seconds
==> default: Notice: /Stage[main]/Nodejs::Repo::Nodesource::Yum/File[/etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL]/ensure: defined content as '{md5}98996aced02654a18b463e9893945968'
==> default: Notice: /Stage[main]/Nodejs::Repo::Nodesource::Yum/Yumrepo[nodesource]/ensure: created
==> default: Notice: /Stage[main]/Nodejs::Repo::Nodesource::Yum/Yumrepo[nodesource-source]/ensure: created
==> default: Notice: /Stage[main]/Nodejs::Install/Package[nodejs]/ensure: created
==> default: Error: Execution of '/bin/rpm -e npm-3.10.8-1.6.9.1.4.el7.x86_64' returned 1: error: Failed dependencies:
==> default:    npm = 1:3.10.8-1.6.9.1.4.el7 is needed by (installed) nodejs-1:6.9.1-4.el7.x86_64
==> default: Error: /Stage[main]/Nodejs::Install/Package[npm]/ensure: change from 3.10.8-1.6.9.1.4.el7 to absent failed: Execution of '/bin/rpm -e npm-3.10.8-1.6.9.1.4.el7.x86_64' returned 1: error: Failed dependencies:
==> default:    npm = 1:3.10.8-1.6.9.1.4.el7 is needed by (installed) nodejs-1:6.9.1-4.el7.x86_64
==> default: Notice: /Stage[main]/Nodejs::Install/File[root_npmrc]/ensure: defined content as '{md5}43cd7c9106474b6fe4b5fc27601d01d0'
==> default: Notice: /Stage[main]/Nodejs/Anchor[::nodejs::end]: Dependency Package[npm] has failures: true
==> default: Warning: /Stage[main]/Nodejs/Anchor[::nodejs::end]: Skipping because of failed dependencies
==> default: Notice: /Stage[main]/Install_packages/Package[inotify-tools]/ensure: created
==> default: Notice: /Stage[main]/Install_packages/Package[ruby-devel]/ensure: created
==> default: Notice: /Stage[main]/Install_packages/Package[uglify-js]/ensure: created
==> default: Notice: /Stage[main]/Install_packages/Package[node-sass]/ensure: created
==> default: Notice: /Stage[main]/Install_packages/Package[imagemin]/ensure: created
==> default: Notice: /Stage[main]/Create_directories/File[/vagrant/log/]/ensure: created
==> default: Notice: /Stage[main]/Create_directories/File[/vagrant/webroot/sites/all/themes/custom/sample_theme/asset]/ensure: created
==> default: Notice: /Stage[main]/Create_compilers/File[/vagrant/webroot/sites/all/themes/custom/sample_theme/asset/img/]/ensure: created
==> default: Notice: /Stage[main]/Create_compilers/File[imagemin-startup-script]/ensure: defined content as '{md5}767ae1bd7c68702603e33f1278e85325'
==> default: Notice: /Stage[main]/Create_compilers/Exec[dos2unix-systemd-imagemin]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/Exec[dos2unix-bash-imagemin]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/Service[imagemin]/ensure: ensure changed 'stopped' to 'running'
==> default: Notice: /Stage[main]/Create_compilers/Exec[touch-img-files]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/File[/vagrant/webroot/sites/all/themes/custom/sample_theme/asset/css/]/ensure: created
==> default: Notice: /Stage[main]/Create_compilers/File[sass-startup-script]/ensure: defined content as '{md5}e3a8dc1bdf10442142a37da36399fb28'
==> default: Notice: /Stage[main]/Create_compilers/Exec[dos2unix-systemd-sass]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/Exec[dos2unix-bash-sass]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/Service[sass]/ensure: ensure changed 'stopped' to 'running'
==> default: Notice: /Stage[main]/Create_compilers/Exec[touch-scss-files]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/File[/vagrant/webroot/sites/all/themes/custom/sample_theme/asset/js/]/ensure: created
==> default: Notice: /Stage[main]/Create_compilers/File[uglifyjs-startup-script]/ensure: defined content as '{md5}229e6ff3841985095cee0b3c1bd4ad34'
==> default: Notice: /Stage[main]/Create_compilers/Exec[dos2unix-systemd-uglifyjs]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/Exec[dos2unix-bash-uglifyjs]: Triggered 'refresh' from 1 events
==> default: Notice: /Stage[main]/Create_compilers/Service[uglifyjs]/ensure: ensure changed 'stopped' to 'running'
==> default: Notice: /Stage[main]/Create_compilers/Exec[touch-js-files]: Triggered 'refresh' from 1 events
==> default: Notice: Applied catalog in 71.41 seconds
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

@jeff1evesque
Copy link
Author

jeff1evesque commented Jan 13, 2017

I also removed maestrodev/puppet-wget from my Puppetfile. In the past I think wget was a dependency for the nodejs module, which is no longer the case now. However, I'm still getting the above error traceback, during a vagrant up build.

@rnelson0
Copy link
Member

Try setting nodejs::npm_package_ensure to present. It defaults to absent which is causing the visible conflict.

@jeff1evesque
Copy link
Author

Thank you, your suggestion did the trick!

@jeff1evesque
Copy link
Author

jeff1evesque commented Jan 13, 2017

@bastelfreak was probably correct too. I was definitely using a really old version of this module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants