Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Npm is throwing errors on new install (CentosOS 7) #248

Open
GasparYYC opened this issue Jan 14, 2018 · 1 comment
Open

Npm is throwing errors on new install (CentosOS 7) #248

GasparYYC opened this issue Jan 14, 2018 · 1 comment

Comments

@GasparYYC
Copy link

GasparYYC commented Jan 14, 2018

On a brand new installation (CentOS 7) on Vultr seems npm is just not happy..
I don't know if the mess they have with npm is affecting or OXAR Script needs to be revamped..
I know npm is a messy animal.. but maybe something can be done..

[root@portal oxar]# . build.sh

* Installing packages with yum *
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.fdcservers.net
 * epel: fedora-epel.mirror.lstn.net
 * extras: bay.uchicago.edu
 * updates: mirror.oss.ou.edu
No packages marked for update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.fdcservers.net
 * epel: fedora-epel.mirror.lstn.net
 * extras: bay.uchicago.edu
 * updates: mirror.oss.ou.edu
Package unzip-6.0-16.el7.x86_64 already installed and latest version
Package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64 already installed and latest version
Nothing to do

* Loading configurations *

######################################################################## 100.0%

* Running updates *

warning: /var/cache/yum/x86_64/7/nodesource/packages/nodejs-8.9.4-1nodesource.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 34fa74dd:                NOKEY
Importing GPG key 0x34FA74DD:
 Userid     : "NodeSource <[email protected]>"
 Fingerprint: 2e55 207a 95d9 944b 0cc9 3261 5ddb e8d4 34fa 74dd
 Package    : nodesource-release-el7-1.noarch (installed)
 From       : /etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
Warning: RPMDB altered outside of yum.
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha1-QFUCsAfzGcP0cXXER0UnMA8qta0= i               ntegrity checksum failed when using sha1: wanted sha1-QFUCsAfzGcP0cXXER0UnMA8qta0= but got sha512-zr6QQnzLt3Ja0t0XI8gws2kn7zV2p0l/D3kreNvS6               hFZhVU5g+uY/30l42jbgt0XGcNBEmBDGJR71J692V92tA==. (260 bytes)
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/pm2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":               "linux","arch":"x64"})

Created symlink from /etc/systemd/system/multi-user.target.wants/pm2-root.service to /etc/systemd/system/pm2-root.service.
/usr/bin/which: no bower in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
npm WARN deprecated [email protected]: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by                migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/

* Installing ratom *

/usr/bin/which: no ratom in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
######################################################################## 100.0%

* Expanding Swap Space *

2099200+0 records in
2099200+0 records out
2149580800 bytes (2.1 GB) copied, 6.50535 s, 330 MB/s

* Installing Oracle XE *

######################################################################## 100.0%
/var/tmp/rpm-tmp.WCGarN: line 257: [: 18446744073692774399: integer expression expected
/var/tmp/rpm-tmp.WCGarN: line 271: [: 18446744073692774399: integer expression expected

* Oracle Config *

* Installing APEX *

######################################################################## 100.0%

* Configuring APEX *


* Installing node-oracledb *

oracledb ERR! Error: Cannot find odpi/include/dpi.h.  For GitHub ZIP downloads you must separately download the odpi subdirectory from GitHub.
oracledb ERR! Error: See https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#github

gyp: Call to 'INSTURL="https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#github"; ERR="oracledb ERR! Error:"; if [ -f odpi/include/d         pi.h ]; then echo "Has dpi.h"; else echo "$ERR Cannot find odpi/include/dpi.h.  For GitHub ZIP downloads you must separately download the odpi su         bdirectory from GitHub." >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi;' returned exit status 0 while in binding.gyp. while trying to load b         inding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 3.10.0-693.11.6.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 /root/oxar/node-oracledb
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): /root/oxar/node-oracledb/node_modules/nan is not a child of /usr/lib
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/2018-01-14T21_48_13_572Z-debug.log

* Installing Node4ORDS *

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No license field.

Generating a 2048 bit RSA private key
.......................+++
.........................................................................................+++
writing new private key to 'localhost.key'
-----

* Installing Tomcat *

Warning: RPMDB altered outside of yum.
Created symlink from /etc/systemd/system/multi-user.target.wants/[email protected] to /usr/lib/systemd/system/[email protected].

* Configuring firewalld *

Looking at the file: /root/.npm/_logs/2018-01-14T21_48_13_572Z-debug.log

[root@server ~]# cat /root/.npm/_logs/2018-01-14T21_48_13_572Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/bin/npm', 'install', '-g', '--unsafe-perm' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 1520f9613253f1f2
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly pacote directory manifest for undefined@file: fetched in 17ms
8 silly install loadIdealTree
9 silly install cloneCurrentTreeToIdealTree
10 silly install loadShrinkwrap
11 silly install loadAllDepsIntoIdealTree
12 silly resolveWithNewModule [email protected] checking installable status
13 http fetch GET 304 https://registry.npmjs.org/nan 86ms (from cache)
14 silly pacote range manifest for nan@~2.8.0 fetched in 124ms
15 silly resolveWithNewModule [email protected] checking installable status
16 silly currentTree lib
17 silly idealTree lib
17 silly idealTree └─┬ [email protected]
17 silly idealTree   └── [email protected]
18 silly install generateActionsToTake
19 silly diffTrees action count 2
20 silly diffTrees add [email protected]
21 silly diffTrees add [email protected]
22 silly decomposeActions action count 14
23 silly decomposeActions fetch [email protected]
24 silly decomposeActions extract [email protected]
25 silly decomposeActions preinstall [email protected]
26 silly decomposeActions build [email protected]
27 silly decomposeActions install [email protected]
28 silly decomposeActions postinstall [email protected]
29 silly decomposeActions finalize [email protected]
30 silly decomposeActions refresh-package-json [email protected]
31 silly decomposeActions preinstall [email protected]
32 silly decomposeActions build [email protected]
33 silly decomposeActions install [email protected]
34 silly decomposeActions postinstall [email protected]
35 silly decomposeActions finalize [email protected]
36 silly decomposeActions refresh-package-json [email protected]
37 silly install executeActions
38 silly doSerial global-install 14
39 verbose correctMkdir /root/.npm/_locks correctMkdir not in flight; initializing
40 verbose lock using /root/.npm/_locks/staging-a072192f34a17023.lock for /usr/lib/node_modules/.staging
41 silly doParallel extract 14
42 silly extract [email protected]
43 silly pacote trying nan@https://registry.npmjs.org/nan/-/nan-2.8.0.tgz by hash: sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=
44 silly pacote nan@https://registry.npmjs.org/nan/-/nan-2.8.0.tgz extracted to /usr/lib/node_modules/.staging/nan-e52c4313 by content address 49ms
45 silly doReverseSerial unbuild 14
46 silly doSerial remove 14
47 silly doSerial move 14
48 silly doSerial finalize 14
49 silly finalize /root/oxar/node-oracledb/node_modules/nan
50 silly finalize /root/oxar/node-oracledb
51 silly doParallel refresh-package-json 14
52 silly refresh-package-json /root/oxar/node-oracledb/node_modules/nan
53 silly refresh-package-json /root/oxar/node-oracledb
54 silly doParallel preinstall 14
55 silly preinstall [email protected]
56 info lifecycle [email protected]~preinstall: [email protected]
57 silly preinstall [email protected]
58 info lifecycle [email protected]~preinstall: [email protected]
59 silly doSerial build 14
60 silly build [email protected]
61 info linkStuff [email protected]
62 silly linkStuff [email protected] has /root/oxar/node-oracledb/node_modules as its parent node_modules
63 silly linkStuff [email protected] is part of a global install
64 silly linkStuff [email protected] is installed into a global node_modules
65 verbose linkBins [email protected]
66 verbose linkMans [email protected]
67 silly build [email protected]
68 info linkStuff [email protected]
69 silly linkStuff [email protected] has /usr/lib/node_modules as its parent node_modules
70 silly linkStuff [email protected] is part of a global install
71 silly linkStuff [email protected] is installed into a global node_modules
72 silly linkStuff [email protected] is installed into the top-level global node_modules
73 verbose linkBins [email protected]
74 verbose linkMans [email protected]
75 silly doSerial global-link 14
76 silly doParallel update-linked 14
77 silly doSerial install 14
78 silly install [email protected]
79 info lifecycle [email protected]~install: [email protected]
80 silly install [email protected]
81 info lifecycle [email protected]~install: [email protected]
82 verbose lifecycle [email protected]~install: unsafe-perm in lifecycle true
83 verbose lifecycle [email protected]~install: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/lib/node_modules/oracledb/node_modules/.bin:/usr/lib/node_modules/.bin:/u01/app/oracle/product/11.2.0/xe/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
84 verbose lifecycle [email protected]~install: CWD: /usr/lib/node_modules/oracledb
85 silly lifecycle [email protected]~install: Args: [ '-c', 'node-gyp rebuild' ]
86 silly lifecycle [email protected]~install: Returned: code: 1  signal: null
87 info lifecycle [email protected]~install: Failed to exec install script
88 verbose unlock done using /root/.npm/_locks/staging-a072192f34a17023.lock for /usr/lib/node_modules/.staging
89 warn rollback Rolling back [email protected] failed (this is probably harmless): /root/oxar/node-oracledb/node_modules/nan is not a child of /usr/lib
90 verbose stack Error: [email protected] install: `node-gyp rebuild`
90 verbose stack Exit status 1
90 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
90 verbose stack     at emitTwo (events.js:126:13)
90 verbose stack     at EventEmitter.emit (events.js:214:7)
90 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
90 verbose stack     at emitTwo (events.js:126:13)
90 verbose stack     at ChildProcess.emit (events.js:214:7)
90 verbose stack     at maybeClose (internal/child_process.js:925:16)
90 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
91 verbose pkgid [email protected]
92 verbose cwd /root/oxar/node-oracledb
93 verbose Linux 3.10.0-693.11.6.el7.x86_64
94 verbose argv "/usr/bin/node" "/bin/npm" "install" "-g" "--unsafe-perm"
95 verbose node v8.9.4
96 verbose npm  v5.6.0
97 error code ELIFECYCLE
98 error errno 1
99 error [email protected] install: `node-gyp rebuild`
99 error Exit status 1
100 error Failed at the [email protected] install script.
100 error This is probably not a problem with npm. There is likely additional logging output above.
101 verbose exit [ 1, true ]
[root@server ~]#

I suspect this server will have issues updating npm down the road rendering the server useless
Similar to See Issue #247

Look at the line right after Installing Ratom:
npm WARN deprecated [email protected]: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
Seems to be a solution as per Issue https://github.com/npm/npm/issues/17146

@MaikelAtWork
Copy link

Hi, works if you edit the file scripts/node-oracledb.sh and append these 2 lines before the 'npm install -g --unsafe-perm' command:
git submodule init
git submodule update

This is explained in section 3.11.2 of https://github.com/oracle/node-oracledb/blob/master/INSTALL.md
Regards
Maikel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants