Description of problem: after removing nodejs-gyp, the package is trying to build with v8314-gyp, but since configure.js clears PYTHONPATH, the gyp python module is not found. Version-Release number of selected component (if applicable): nodejs010-node-gyp-1.0.2-3.el7 nodejs010-node-gyp-1.0.2-3.el6 How reproducible: everytime Steps to Reproduce: 1. try to rebuild nodejs010-nodejs-bson package Actual results: gyp info spawn argsTraceback (most recent call last): '-Goutput_dir=.' ] File "/opt/rh/v8314/root/usr/bin/gyp", line 15, in <module> import gyp Expected results: package builds successfully Additional info: found during centos rebuild: https://cbs.centos.org/koji/taskinfo?taskID=24459
Working around the path issue by commenting the line that overwrites PYTHONPATH in configure.js reveals further issues, such as gyp: error: no such option: --no-parallel One workaround is to install a newer version of node-gyp using npm, so it seems we're needing an update to the packaged node-gyp to alleviate this issue. The PYTHONPATH workaround is not required with the newer node-gyp. The version of node-gyp I have from RPMs (via software collections) is nodejs010-node-gyp-1.0.2-3.el6.noarch. The version installed by npm is 3.0.3
I am hitting the same issue with nodejs010-2.1-3.el6.x86_64 and nodejs010-node-gyp-1.0.2-3.el6.noarch. The original node-gyp comes with bundled gyp inside it; which is expected to be located in node-gyp/gyp/pylib and the config.js file overrides the PYTHONPATH. When the RPM provided gyp wrapper is called it takes no measures to readjust the PYTHONPATH and the RPM provided node-gyp doesn't have gyp/pylib directory at all; resulting in errors. The simplest workaround that I have found is to edit /opt/rh/v8314/root/usr/bin/gyp and add line right after the import sys: sys.path.append("/opt/rh/v8314/root/usr/lib/python2.6/site-packages") The above path is where the RPM supplied gyp is located which completely fixes the issue. Without this fix npm install for any packages that have addons is effectively broken.
Proposing for 2.2-Z update along with bug 1344158
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/RHSA-2016:1380
*** Bug 1241519 has been marked as a duplicate of this bug. ***