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:
- Would that fix it?
- If so, how do I achieve that?
- 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 convincing5.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.