Reputation: 910
We are having an issue on both CentOS 7.3 and RHEL 7.3 trying to install the latest NodeJs fabric-ca-client
Here is a complete listing:
sudo npm install -g [email protected]
> [email protected] install /usr/lib/node_modules/fabric-ca-client/node_modules/x509
> node-gyp rebuild
gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! stack at Error (native)
gyp ERR! System Linux 3.10.0-514.el7.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/fabric-ca-client/node_modules/x509
gyp ERR! node -v v6.11.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-07-19T14_02_06_503Z-debug.log
The listing in 2017-07-19T14_02_06_503Z-debug.log contains the folowing:
1666 silly install [email protected]
1667 info lifecycle [email protected]~install: [email protected]
1668 verbose lifecycle [email protected]~install: unsafe-perm in lifecycle false
1669 verbose lifecycle [email protected]~install: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/usr/lib/node_modules/fabric-ca-client/node_modules/x509/node_modules/.bin:/usr/lib/node_modules/fabric-ca-client/node_modules/.bin:/usr/lib/node_modules/.bin:/sbin:/bin:/usr/sbin:/usr/bin
1670 verbose lifecycle [email protected]~install: CWD: /usr/lib/node_modules/fabric-ca-client/node_modules/x509
1671 silly lifecycle [email protected]~install: Args: [ '-c', 'node-gyp rebuild' ]
1672 silly lifecycle [email protected]~install: Returned: code: 1 signal: null
1673 info lifecycle [email protected]~install: Failed to exec install script
1674 verbose unlock done using /root/.npm/_locks/staging-a072192f34a17023.lock for /usr/lib/node_modules/.staging
1675 verbose stack Error: [email protected] install: `node-gyp rebuild`
1675 verbose stack Exit status 1
1675 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:289:16)
1675 verbose stack at emitTwo (events.js:106:13)
1675 verbose stack at EventEmitter.emit (events.js:191:7)
1675 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
1675 verbose stack at emitTwo (events.js:106:13)
1675 verbose stack at ChildProcess.emit (events.js:191:7)
1675 verbose stack at maybeClose (internal/child_process.js:891:16)
1675 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
1676 verbose pkgid [email protected]
1677 verbose cwd /home/ibmuser
1678 verbose Linux 3.10.0-514.el7.x86_64
1679 verbose argv "/usr/bin/node" "/bin/npm" "install" "-g" "[email protected]"
1680 verbose node v6.11.0
1681 verbose npm v5.3.0
1682 error code ELIFECYCLE
1683 error errno 1
1684 error [email protected] install: `node-gyp rebuild`
1684 error Exit status 1
1685 error Failed at the [email protected] install script.
1685 error This is probably not a problem with npm. There is likely additional logging output above.
Any help greatly appreciated. Thanks in advance!
Upvotes: 1
Views: 1902
Reputation: 910
It seems the NodeJs package fabric-ca-client version 1.0.0 cannot be installed globally by root because of a known isue in the dependency package x509 https://github.com/Southern/node-x509/issues/49 but it can be installed locally in a NodeJs source folder with a valid package.json.
Upvotes: 3