Bug 1637701 - Impossible to switch streams from nodejs:10 to nodejs:8
Summary: Impossible to switch streams from nodejs:10 to nodejs:8
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: nodejs
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stephen Gallagher
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1638778 (view as bug list)
Depends On: 1594647
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-09 19:53 UTC by Petr Šabata
Modified: 2020-08-16 10:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-11 16:29:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Šabata 2018-10-09 19:53:40 UTC
Description of problem:
Trying to downgrade to nodejs:8 from modular nodejs:10 blows up.

Version-Release number of selected component (if applicable):
nodejs:10:20180920144631
nodejs:8:20180816123422

How reproducible:
Always.

Steps to Reproduce:
1. dnf module install nodejs:10
2. dnf module install nodejs:8 OR dnf module enable nodejs:8 && dnf distro-sync

Actual results:
Installation fails on many, many file conflicts, e.g.:

Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
  file /usr/lib/node_modules/npm/node_modules/JSONStream from install of npm-1:5.6.0-1.8.11.4.1.module_2030+281d4413.x86_64 conflicts with file from package npm-1:6.4.1-1.10.11.0.1.module_2200+36094b1f.x86_64
  file /usr/lib/node_modules/npm/node_modules/abbrev from install of npm-1:5.6.0-1.8.11.4.1.module_2030+281d4413.x86_64 conflicts with file from package npm-1:6.4.1-1.10.11.0.1.module_2200+36094b1f.x86_64
  file /usr/lib/node_modules/npm/node_modules/ansi-regex from install of npm-1:5.6.0-1.8.11.4.1.module_2030+281d4413.x86_64 conflicts with file from package npm-1:6.4.1-1.10.11.0.1.module_2200+36094b1f.x86_64
(...)

Expected results:
My system downgrades nodejs to nodejs:8 packages.

Additional info:
This might not be possible to fix due to changes in nodejs packaging.
But let's check.

Comment 1 Stephen Gallagher 2018-10-11 16:29:07 UTC
Unfortunately, we can't make this work. Between Node.js 8 and Node.js 10, the packaging of the bundled NPM changed significantly and required us to replace a whole lot of symlinks with a real directory. See https://bugzilla.redhat.com/show_bug.cgi?id=1594647 for all the gory details.

Because of limitations in RPM, we can't downgrade back to the older version without considerable hacking around in pre- and post- scripts.

Comment 2 Stephen Gallagher 2018-10-12 13:14:13 UTC
*** Bug 1638778 has been marked as a duplicate of this bug. ***

Comment 3 Stephen Gallagher 2018-10-12 13:16:10 UTC
For the record, the workaround here is to completely remove the nodejs RPM from the system before switching streams and then reinstall it.

Comment 4 giampaolo ferradini 2020-08-11 21:34:31 UTC
(In reply to Stephen Gallagher from comment #3)
> For the record, the workaround here is to completely remove the nodejs RPM
> from the system before switching streams and then reinstall it.

I would assume this bug is still floating around, correct? At least I can report a behaviour similar to the one reported in bug 1638778 (the duplicate mentioned above).
My problem is: these messages appeared after a `# dnf remove nodejs npm` and a reinstall. Is there additional steps required to 'completely' remove it?

Cheers!

Comment 5 giampaolo ferradini 2020-08-11 22:40:59 UTC
Edit, and solution for the records: I installed nvm from source (i.e. from https://github.com/nvm-sh/nvm#install--update-script ) and then installed through nvm itself (`nvm install --lts`, no need to pick the stable long term version, just a personal choice.)
`dnf` had removed some stuff, so that checking `node -v` would return `command not found`, and then nvm took care of the rest.


Note You need to log in before you can comment on or make changes to this bug.