IBM / nodejs-idb-connector

A JavaScript (Node.js) library for communicating with Db2 for IBM i, with support for queries, procedures, and much more. Uses traditional callback-style syntax

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing method during install

jwoehr opened this issue · comments

$ npm install idb-connector
npm ERR! asyncWrite is not a function
npm ERR! pna.nextTick is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/JWOEHR/.npm/_logs/2019-10-31T03_33_46_294Z-debug.log
$ cat /home/JWOEHR/.npm/_logs/2019-10-31T03_33_46_294Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/QOpenSys/pkgs/lib/nodejs8/bin/node',
1 verbose cli   '/QOpenSys/pkgs/bin/npm',
1 verbose cli   'install',
1 verbose cli   'idb-connector' ]
2 info using npm@6.4.1
3 info using node@v8.15.1
4 verbose npm-session 9dc2a199b86bfcd3
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 verbose stack TypeError: asyncWrite is not a function
7 verbose stack     at onwrite (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:480:7)
7 verbose stack     at WritableState.onwrite (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:180:5)
7 verbose stack     at WriteStream.to [as _worker] (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/cache.js:154:13)
7 verbose stack     at WriteStream._write (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/mississippi/node_modules/flush-write-stream/index.js:35:13)
7 verbose stack     at doWrite (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:428:64)
7 verbose stack     at writeOrBuffer (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:417:5)
7 verbose stack     at WriteStream.Writable.write (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:334:11)
7 verbose stack     at WriteStream.to [as _worker] (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/cache.js:171:25)
7 verbose stack     at WriteStream._write (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/mississippi/node_modules/flush-write-stream/index.js:35:13)
7 verbose stack     at doWrite (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:428:64)
7 verbose stack     at writeOrBuffer (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:417:5)
7 verbose stack     at WriteStream.Writable.write (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:334:11)
7 verbose stack     at WriteStream.to [as _worker] (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/cache.js:182:19)
7 verbose stack     at WriteStream._write (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/mississippi/node_modules/flush-write-stream/index.js:35:13)
7 verbose stack     at doWrite (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:428:64)
7 verbose stack     at writeOrBuffer (/QOpenSys/pkgs/lib/nodejs8/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:417:5)
8 verbose cwd /home/JWOEHR/work/nodejs/dataara
9 verbose OS400 7.3
10 verbose argv "/QOpenSys/pkgs/lib/nodejs8/bin/node" "/QOpenSys/pkgs/bin/npm" "install" "idb-connector"
11 verbose node v8.15.1
12 verbose npm  v6.4.1
13 error asyncWrite is not a function
14 verbose exit [ 1, true ]

What does ls -l /QOpenSys/pkgs/bin/npm give you? Also, what is $PATH?

$ ls -l /QOpenSys/pkgs/bin/npm
lrwxrwxrwx 1 qsys 0 68 Jan  8  2019 /QOpenSys/pkgs/bin/npm -> /QOpenSys/pkgs/lib/nodejs8/bin/npm
$ echo $PATH
/home/JWOEHR/bin:/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/QOpenSys/pkgs/lib/nodejs8/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/opt/apache-ant-1.10.1/bin

There's nothing in my ~/bin dir

Looks like tj/n#508, though I'm not sure how you'd just now be running in to a 1+ year old bug. What's in your node_modules directory?

Looks like tj/n#508, though I'm not sure how you'd just now be running in to a 1+ year old bug. What's in your node_modules directory?

Old crap. I'll delete everything and try again.

Deleted my local modules but phenom persists.
I guess I should delete my oldish node.js install and re-install.

From the linked bug, it sounds like it can happen if a newer version of an npm install is overlaid on to an older npm install. Due to the layout change across some versions, installing it this way causes the wrong packages from the older nested structure to be picked up instead. I'm not sure why that would have happened with our RPM install, but it's possible we need to look in to it further. I'd be curious what is left in /QOpenSys/pkgs/lib/nodejs8/lib/node_modules after you uninstall the package.

Kevin, this is that shared system we use ... I'm going to have to poll the users for a day before I delete the installation. Thanks muchly for your assistance ... I'll report back on "what's left" when I delete.

The answer about removing node with yum:

  • nodejs10 was erased nicely
  • nodejs8 said it was erased but the full dir is still there in /QOpenSys/pkgs/lib/nodejs8

PEBCAK apparently. Got ca-certificates-mozilla installed and everything working.

@kadler Maybe we should make the nodejs rpm depend on ca-certificates-mozilla?

No, we're going to add it to the bootstrap, which will fix the problems for the repos using https