4

I'm pretty new to node.js and its package management system and its require. I'm having trouble with the following runtime error I'm getting after having installed a bunch of packages with npm install:

ERROR: Couldn't initialise framework "wdio-mocha-framework".
Error: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found 
(required by <path>.../node_modules/fibers/bin/linux-ia32-v8-5.0/fibers.node)
at Error (native)

My understanding of the error is that the binary fibers.node was compiled with a newer libstdc++ than the one available at runtime.

It appears to me like the npm install did compile a fibers.node:

> fibers@1.0.13 install <path>.../node_modules/fibers
> node build.js || nodejs build.js

make[1]: Entering directory `<path>.../node_modules/fibers/build'
<snip some output, including warnings, here that I don't deem relevant>
Installed in `<path>.../node_modules/fibers/bin/linux-ia32-v8-3.14/fibers.node`

However, I see that the fibers.node that is throwing the error at runtime is not the same one as was compiled, and I assume that's the source of the problem.

Compiled:

.../linux-ia32-v8-3.14/fibers.node

Used at runtime and fails:

.../linux-ia32-v8-5.0/fibers.node

So I'm guessing and hoping that if I could convince wdio-mocha-framework to use the locally-compiled fibers.node, it would work. My questions are thus:

  1. Would that fix it?
  2. If so, how do I achieve that?
  3. If not, what's the correct direction to take to further understand and fix this error? Perhaps instead of getting 3.14 to be used at runtime, I should be convincing 5.0 to be compiled at install-time? Or ... other?

Your help is most sincerely appreciated.

Update/Edit:

I think I solved this on my own, in case anyone ever finds this poor, dusty old question lying forgotten on the back of a shelf somewhere...

The problem was apparently due to multiple versions of node/node-gyp that were installed in my environment in parallel, and the build process, even though it was started with a newer version of node, was finding node-gyp in the $PATH and that's apparently what caused the old version of fibers to be built. At least, I think so.

e.dan
  • 7,275
  • 1
  • 26
  • 29
  • which version did you use to manage build linux-x64-v8-3.14? for some reason i can't get that binary to be generated. – kroe Dec 09 '16 at 16:08

1 Answers1

1

Just had this problem recently. I managed to solve it just by uninstalling the current version of Node.JS (I had the most recent, in this case 9.5.0) and installing the recommended, in this case 8.9.4. and the issue is gone. hope this helps someone.

Hoverlord
  • 21
  • 6