Bug 1760184 - [rh-nodejs12] npm --version fail -> Error: Cannot find module '../lib/utils/unsupported.js' in container
Summary: [rh-nodejs12] npm --version fail -> Error: Cannot find module '../lib/utils/u...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: nodejs
Version: rh-nodejs12
Hardware: s390x
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.3
Assignee: Node.js maintainers
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-10 05:30 UTC by Honza Horak
Modified: 2019-12-10 07:57 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-10 07:57:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:4127 0 None None None 2019-12-10 07:57:45 UTC

Description Honza Horak 2019-10-10 05:30:47 UTC
This bug was initially created as a copy of Bug #1759152

I am copying this bug because the same behaviour is seen in rh-nodejs12.


Description of problem:

Using rh-nodejs12-npm is broken, however only inside the container and only on s390x. On machine itself npm --version works (same version).

Version-Release number of selected component (if applicable):
rh-nodejs12-npm-6.10.3-12.10.0.2.el7.s390x
rh-nodejs12-nodejs-12.10.0-2.el7.s390x

How reproducible:
always

Steps to Reproduce:

#> docker run -ti -u 0 registry.access.redhat.com/rhscl/s2i-base-rhel7 bash

bash-4.2# curl -Lk https://gitlab.cee.redhat.com/platform-eng-core-services/internal-repos/raw/master/rhscl/rhscl-rhel-7.repo >/etc/yum.repos.d/rhscl-rhel-7.repo

bash-4.2# curl -Lk http://git.app.eng.bos.redhat.com/git/RH_Software_Collections.git/plain/Containers/osbs-repos-signed-pkgs/rolling-rhscl-3.4.repo >/etc/yum.repos.d/rolling-rhscl-3.4.repo

bash-4.2#  yum install http://download.eng.bos.redhat.com/brewroot/vol/rhel-7/packages/rh-nodejs12-nodejs/12.10.0/2.el7/s390x/rh-nodejs12-nodejs-12.10.0-2.el7.s390x.rpm http://download.eng.bos.redhat.com/brewroot/vol/rhel-7/packages/rh-nodejs12-nodejs/12.10.0/2.el7/s390x/rh-nodejs12-npm-6.10.3-12.10.0.2.el7.s390x.rpm http://download.eng.bos.redhat.com/brewroot/vol/rhel-7/packages/rh-nodejs12/3.4/1.el7/s390x/rh-nodejs12-runtime-3.4-1.el7.s390x.rpm

bash-4.2# scl enable rh-nodejs12 -- npm --version
fs.js:130
    throw err;
    ^

Error: ENOENT: no such file or directory, open '/opt/rh/rh-nodejs12/root/usr/lib/utils/unsupported.js'
    at Object.openSync (fs.js:451:3)
    at Object.readFileSync (fs.js:353:35)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:946:22)
    at Module.load (internal/modules/cjs/loader.js:790:32)
    at Function.Module._load (internal/modules/cjs/loader.js:703:12)
    at Module.require (internal/modules/cjs/loader.js:830:19)
    at require (internal/modules/cjs/helpers.js:68:18)
    at /opt/rh/rh-nodejs12/root/usr/bin/npm:19:21
    at Object.<anonymous> (/opt/rh/rh-nodejs12/root/usr/bin/npm:153:3)
    at Module._compile (internal/modules/cjs/loader.js:936:30) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/opt/rh/rh-nodejs12/root/usr/lib/utils/unsupported.js'
}


See bz#1759152 for more info and a patch.

Comment 2 Jan Staněk 2019-10-11 09:53:14 UTC
Rebuilt with adapted patch as rh-nodejs12-nodejs-12.10.0-3.el7.

Comment 6 errata-xmlrpc 2019-12-10 07:57:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:4127


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