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

installing nodejs 4 leads to npm being installed as well, which fails the nodejs install #165

Closed
despairblue opened this issue Sep 16, 2015 · 12 comments
Labels
bug Something isn't working needs-feedback Further information is requested

Comments

@despairblue
Copy link

  class { 'nodejs':
    repo_url_suffix           => 'node_4.x',
    npm_package_ensure        => 'latest',
  }

leads to:

Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install npm' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 npm : Depends: nodejs but it is not going to be installed
       Depends: node-abbrev (>= 1.0.4) but it is not going to be installed
       Depends: node-ansi but it is not going to be installed
       Depends: node-archy but it is not going to be installed
       Depends: node-block-stream but it is not going to be installed
       Depends: node-fstream (>= 0.1.22) but it is not going to be installed
       Depends: node-fstream-ignore but it is not going to be installed
       Depends: node-github-url-from-git but it is not going to be installed
       Depends: node-glob (>= 3.1.21) but it is not going to be installed
       Depends: node-graceful-fs (>= 2.0.0) but it is not going to be installed
       Depends: node-inherits but it is not going to be installed
       Depends: node-ini (>= 1.1.0) but it is not going to be installed
       Depends: node-lockfile but it is not going to be installed
       Depends: node-lru-cache (>= 2.3.0) but it is not going to be installed
       Depends: node-minimatch (>= 0.2.11) but it is not going to be installed
       Depends: node-mkdirp (>= 0.3.3) but it is not going to be installed
       Depends: node-gyp (>= 0.10.9) but it is not going to be installed
       Depends: node-nopt (>= 2.1.1) but it is not going to be installed
       Depends: node-npmlog but it is not going to be installed
       Depends: node-once but it is not going to be installed
       Depends: node-osenv but it is not going to be installed
       Depends: node-read but it is not going to be installed
       Depends: node-read-package-json (>= 1.1.0) but it is not going to be installed
       Depends: node-request (>= 2.25.0) but it is not going to be installed
       Depends: node-retry but it is not going to be installed
       Depends: node-rimraf (>= 2.2.2) but it is not going to be installed
       Depends: node-semver (>= 2.1.0) but it is not going to be installed
       Depends: node-sha but it is not going to be installed
       Depends: node-slide but it is not going to be installed
       Depends: node-tar (>= 0.1.18) but it is not going to be installed
       Depends: node-which but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Error: /Stage[main]/Nodejs::Install/Package[npm]/ensure: change from purged to latest failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install npm' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 npm : Depends: nodejs but it is not going to be installed
       Depends: node-abbrev (>= 1.0.4) but it is not going to be installed
       Depends: node-ansi but it is not going to be installed
       Depends: node-archy but it is not going to be installed
       Depends: node-block-stream but it is not going to be installed
       Depends: node-fstream (>= 0.1.22) but it is not going to be installed
       Depends: node-fstream-ignore but it is not going to be installed
       Depends: node-github-url-from-git but it is not going to be installed
       Depends: node-glob (>= 3.1.21) but it is not going to be installed
       Depends: node-graceful-fs (>= 2.0.0) but it is not going to be installed
       Depends: node-inherits but it is not going to be installed
       Depends: node-ini (>= 1.1.0) but it is not going to be installed
       Depends: node-lockfile but it is not going to be installed
       Depends: node-lru-cache (>= 2.3.0) but it is not going to be installed
       Depends: node-minimatch (>= 0.2.11) but it is not going to be installed
       Depends: node-mkdirp (>= 0.3.3) but it is not going to be installed
       Depends: node-gyp (>= 0.10.9) but it is not going to be installed
       Depends: node-nopt (>= 2.1.1) but it is not going to be installed
       Depends: node-npmlog but it is not going to be installed
       Depends: node-once but it is not going to be installed
       Depends: node-osenv but it is not going to be installed
       Depends: node-read but it is not going to be installed
       Depends: node-read-package-json (>= 1.1.0) but it is not going to be installed
       Depends: node-request (>= 2.25.0) but it is not going to be installed
       Depends: node-retry but it is not going to be installed
       Depends: node-rimraf (>= 2.2.2) but it is not going to be installed
       Depends: node-semver (>= 2.1.0) but it is not going to be installed
       Depends: node-sha but it is not going to be installed
       Depends: node-slide but it is not going to be installed
       Depends: node-tar (>= 0.1.18) but it is not going to be installed
       Depends: node-which but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

This is on ubuntu trusty tahr.

@juniorsysadmin
Copy link
Member

Hmm. Can you provide a OS details? Also, does this occur on a fresh box, or just on one with native npm already installed?

@despairblue
Copy link
Author

Happened on Ubuntu Trusty Tahr, and it happened while upgrading from node 0.10.x, which was also installed via this module.

If I recall correctly, I traced the problem to some puppet code that installed npm regardless of the node version. In the 0.10.x package from NodeSource, both of them were seperate packages, but in the node 4 repo they are one package that provides and also conficts with npm. Thus an ensure_package('nodejs', 'npm') will try to install npm from the ubuntu extra repo and nodejs from nodesource that explicitly conflicts with npm.

I manage the repo and installation myself now, so I can't provide any more information or testing.

@Jmeyering
Copy link

I'm also running into this error

@jyaworski
Copy link
Member

@Jmeyering what OS/versions?

@Jmeyering
Copy link

Ubuntu 14.04 node repo version 4.x or 5.x

@realmreith
Copy link

Having the same issue, can we get some update this is seriously broken and entirely useless? I'm getting this on Ubuntu 14.04/ Trusty Tahr.

A potential work around I have tried is just using repo_url_suffix and making sure it doesn't try and install NPM additionally.

@juniorsysadmin
Copy link
Member

@Jmeyering @realmreith Is this still occurring with the latest release?

@juniorsysadmin juniorsysadmin added the needs-feedback Further information is requested label Jun 2, 2016
@Jmeyering
Copy link

So setting nodejs::npm_package_name: false fixes this issue for me, however I feel like that is mostly a hack The error comes from these lines

https://github.com/voxpupuli/puppet-nodejs/blob/master/manifests/install.pp#L55-L60

When its node version >=4 npm shouldn't be installed separately.

@cliff-wakefield
Copy link

Still suffering from this over 12 months later?

Is there a known fix or proper workaround?

@atrepca
Copy link
Contributor

atrepca commented Oct 25, 2016

Bumped into the same issue, on Ubuntu 16.04, node 6.x and module version 2.1.0. As mentioned in the previous comments and @chrislea's comment here, the nodejs package from NodeSource includes npm and the development files. As a workaround, this code works:

class { 'nodejs':
  repo_url_suffix => '6.x',
  nodejs_package_ensure => '6.8.1-1nodesource1~xenial1',
  nodejs_dev_package_ensure => 'absent',
  npm_package_ensure => 'absent',
}

@juniorsysadmin
Copy link
Member

Closing, as I believe most of the issues discussed here have already been fixed.

@juniorsysadmin
Copy link
Member

Closing, as I believe most of the issues discussed here have already been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-feedback Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants