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

Installation on CentOS 7 fails, can't remove npm package #287

Closed
Aethylred opened this issue Apr 3, 2017 · 6 comments
Closed

Installation on CentOS 7 fails, can't remove npm package #287

Aethylred opened this issue Apr 3, 2017 · 6 comments

Comments

@Aethylred
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 3.8.7
  • Ruby: 2.0.0
  • Distribution: CentOS 7
  • Module version: 2.3.0

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

Using puppet-nodejs and stahnma-epel

class{'epel':
  before => Class['redis','nodejs','apache','ruby'],
}
class{'nodejs':
  npm_package_ensure => 'present',
  before             => Class['gitlab'],
}

What are you seeing

Puppet run fails as it's trying to remove a package depended on by the nodejs package

What behaviour did you expect instead

That nodejs would install with dependencies

Output log

Notice: /Stage[main]/Nodejs::Install/Package[nodejs]/ensure: created
Error: Execution of '/bin/rpm -e npm-3.10.10-1.6.9.4.2.el7.x86_64' returned 1: error: Failed dependencies:
        npm = 1:3.10.10-1.6.9.4.2.el7 is needed by (installed) nodejs-1:6.9.4-2.el7.x86_64
Error: /Stage[main]/Nodejs::Install/Package[npm]/ensure: change from 3.10.10-1.6.9.4.2.el7 to absent failed: Execution of '/bin/rpm -e npm-3.10.10-1.6.9.4.2.el7.x86_64' returned 1: error: Failed dependencies:
        npm = 1:3.10.10-1.6.9.4.2.el7 is needed by (installed) nodejs-1:6.9.4-2.el7.x86_64

Any additional information you'd like to impart

Forcing npm package to install is a work around:

package{$dep_packages:
  ensure => 'present',
  before => Class['gitlab','redis','nodejs'],
}
@wyardley
Copy link
Contributor

@Aethylred is this still an issue with the most recent version?

@juniorsysadmin juniorsysadmin added the needs-feedback Further information is requested label Sep 24, 2017
@juniorsysadmin
Copy link
Member

Bump

@Aethylred is this still an issue with the most recent version?

@juniorsysadmin
Copy link
Member

No response, closing

@philomory
Copy link

Sorry to say that this is still a problem. The gist of the issue appears to be that nodejs is getting installed from the nodesource repository, but npm is getting installed from epel. The version of npm in epel relies on the version of nodejs in epel, which is much older that the version in nodesource.

@juniorsysadmin juniorsysadmin reopened this Dec 2, 2018
@alchemyconsulting
Copy link

+1 - I can't work out a workaround either, makes the module unuseable on CentOS7 for me. Using puppet-epel not stahnma-epel.

@kenyon kenyon removed the needs-feedback Further information is requested label Nov 11, 2020
@delinuxspecialist
Copy link

If you use nodejs from Nodesource on CentOS 7 you should set npm_package_ensure => 'absent' because the nodejs package on Nodesource already contains the npm binary. It also states this in the documentation of the module although you might have to read more than the first two lines ;) No TL;DR here.

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

7 participants