distributions icon indicating copy to clipboard operation
distributions copied to clipboard

Unable to upgrade from EPEL to nodesource nodejs

Open jgrund opened this issue 7 years ago • 15 comments

Consider:

 yum info nodejs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
Name        : nodejs
Arch        : x86_64
Epoch       : 1
Version     : 6.11.3
Release     : 1.el7
Size        : 16 M
Repo        : installed
From repo   : addon-epel7-x86_64
Summary     : JavaScript runtime
URL         : http://nodejs.org/
License     : MIT and ASL 2.0 and ISC and BSD
Description : Node.js is a platform built on Chrome's JavaScript runtime
            : for easily building fast, scalable network applications.
            : Node.js uses an event-driven, non-blocking I/O model that
            : makes it lightweight and efficient, perfect for data-intensive
            : real-time applications that run across distributed devices.

Available Packages
Name        : nodejs
Arch        : x86_64
Epoch       : 2
Version     : 8.9.3
Release     : 1nodesource
Size        : 17 M
Repo        : rpm.nodesource.com_pub_8.x_el_7_x86_64_
Summary     : JavaScript runtime
URL         : http://nodejs.org
License     : MIT and ASL 2.0 and ISC and BSD
Description : Node.js is a platform built on Chrome's JavaScript runtime
            : for easily building fast, scalable network applications.
            : Node.js uses an event-driven, non-blocking I/O model that
            : makes it lightweight and efficient, perfect for data-intensive
            : real-time applications that run across distributed devices.

When trying to upgrade:

yum install nodejs
Loaded plugins: copr, fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
 * base: mirror.es.its.nyu.edu
 * epel: mirror.solarvps.com
 * extras: mirror.jax.hugeserver.com
 * updates: mirror.jax.hugeserver.com
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 1:6.12.0-1.el7 will be updated
--> Processing Dependency: nodejs = 1:6.12.0-1.el7 for package: 1:npm-3.10.10-1.6.12.0.1.el7.x86_64
---> Package nodejs.x86_64 2:8.9.3-1nodesource will be an update
--> Finished Dependency Resolution
Error: Package: 1:npm-3.10.10-1.6.12.0.1.el7.x86_64 (@epel)
           Requires: nodejs = 1:6.12.0-1.el7
           Removing: 1:nodejs-6.12.0-1.el7.x86_64 (@epel)
               nodejs = 1:6.12.0-1.el7
           Updated By: 2:nodejs-8.9.3-1nodesource.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.9.3-1nodesource
           Available: 2:nodejs-8.0.0-1nodesource.el7.centos.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.0.0-1nodesource.el7.centos
           Available: 2:nodejs-8.1.0-1nodesource.el7.centos.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.1.0-1nodesource.el7.centos
           Available: 2:nodejs-8.1.1-1nodesource.el7.centos.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.1.1-1nodesource.el7.centos
           Available: 2:nodejs-8.1.2-1nodesource.el7.centos.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.1.2-1nodesource.el7.centos
           Available: 2:nodejs-8.1.3-1nodesource.el7.centos.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.1.3-1nodesource.el7.centos
           Available: 2:nodejs-8.1.4-1nodesource.el7.centos.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.1.4-1nodesource.el7.centos
           Available: 2:nodejs-8.2.0-1nodesource.el7.centos.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.2.0-1nodesource.el7.centos
           Available: 2:nodejs-8.2.1-1nodesource.el7.centos.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.2.1-1nodesource.el7.centos
           Available: 2:nodejs-8.3.0-1nodesource.el7.centos.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.3.0-1nodesource.el7.centos
           Available: 2:nodejs-8.4.0-1nodesource.el7.centos.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.4.0-1nodesource.el7.centos
           Available: 2:nodejs-8.5.0-1nodesource.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.5.0-1nodesource
           Available: 2:nodejs-8.6.0-1nodesource.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.6.0-1nodesource
           Available: 2:nodejs-8.7.0-1nodesource.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.7.0-1nodesource
           Available: 2:nodejs-8.8.0-1nodesource.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.8.0-1nodesource
           Available: 2:nodejs-8.8.1-1nodesource.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.8.1-1nodesource
           Available: 2:nodejs-8.9.0-1nodesource.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.9.0-1nodesource
           Available: 2:nodejs-8.9.1-1nodesource.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.9.1-1nodesource
           Available: 2:nodejs-8.9.2-1nodesource.x86_64 (rpm.nodesource.com_pub_8.x_el_7_x86_64_)
               nodejs = 2:8.9.2-1nodesource
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

I think this is because the nodesource node bundles in npm but doesn't mark it as a provided package so there's no upgrade path.

jgrund avatar Dec 22 '17 15:12 jgrund

I think this is because the nodesource node bundles in npm but doesn't mark it as a provided package

Yup, I believe this is the cause.

This issue also arises when yum is trying to resolve a dependency on npm from any other package.

prupert avatar Jan 03 '18 10:01 prupert

It would be nice if the nodesource packaging could follow EPEL's lead.

Is there any disadvantage to keeping npm separate as they do? The advantage is finer granularity of which packages one might want/need to install, which is never a bad thing.

brianjmurrell avatar Jan 04 '18 16:01 brianjmurrell

We intentionally bundle npm with the main package to get around what we view as dumb behavior by EPEL (and also Debian style distros that do the same thing). You can't really use Node effectively unless you have npm installed, and if they are broken into separate packages then there's a slew of people who install Node by itself and then write us and say "I installed Node, where's Npm?".

But more directly, if you use the installers from nodejs.org, or grab one of the binary tarballs, you get npm with those, and we're trying to emulate that user experience as closely as possible with deb and rpm packages. Hope this helps.

chrislea avatar Jan 04 '18 18:01 chrislea

That still leaves the “provides” issue. You need to update the spec file to fix this.

prupert avatar Jan 04 '18 18:01 prupert

Yes, sorry, I replied too quickly. I'm looking into fixing the provides thing and hopefully will have that sorted out by the next release.

chrislea avatar Jan 04 '18 18:01 chrislea

I am far from anything resembling a Node expert but it seems to me that I could write Node scripts that don't have external package dependencies and therefore require npm. It also seems to me that in the RPM ecosystem, external dependencies could come from RPM (nodejs-* RPMs) rather than npm. But I also feel like I'd be trying to swim upstream to make a case for such use-cases so I guess I'll just have to agree to disagree.

Yes, sorry, I replied too quickly. I'm looking into fixing the provides thing and hopefully will have that sorted out by the next release.

Could we reopen this issue until that happens then, just to keep the bookkeeping accurate and not lose sight of the issue?

brianjmurrell avatar Jan 04 '18 20:01 brianjmurrell

Sure.

chrislea avatar Jan 04 '18 20:01 chrislea

Upgrade

Seetyoadi avatar Jan 10 '18 16:01 Seetyoadi

@Seetyoadi Could you expand?

brianjmurrell avatar Jan 10 '18 18:01 brianjmurrell

Hi, is there any progress on this issue, or any way an external contributor could update the spec?

jgrund avatar Feb 02 '18 16:02 jgrund

Still working on it. Have a lot of edge cases that need testing. Thanks for being patient!

chrislea avatar Feb 02 '18 18:02 chrislea

Hi, any updates?

jgrund avatar Apr 16 '18 13:04 jgrund

Any chance of movement on this? Thanks!

boutell avatar Apr 24 '18 12:04 boutell

Just to clarify that this can be resolved rather easily. You would only need to specify provides: npm in the spec file of your nodejs package.

Nice, clean and easy.

prupert avatar Apr 24 '18 12:04 prupert

how do I go about fixing this upgrade issue? I'm sitting on an old version of node and can't update it with yum

TheSpanner avatar Jun 23 '19 16:06 TheSpanner

changes were added in our pipelines, they will be reflected in a new Node.js version

JesusPaz avatar Jan 02 '23 16:01 JesusPaz