node 9 support
Closed this issue · 7 comments
Hey ! I'm currently working with the last version of node and I don't see if your package supports it.
When I try to install wdio-sync
it gives me the error g++: Command not found
:
$ npm i
> fibers@2.0.2 install /home/rs-e2e/tests/node_modules/fibers
> node build.js || nodejs build.js
make: Entering directory `/home/rs-e2e/tests/node_modules/fibers/build'
CXX(target) Release/obj.target/fibers/src/fibers.o
make: g++: Command not found
make: *** [Release/obj.target/fibers/src/fibers.o] Error 127
make: Leaving directory `/home/rs-e2e/tests/node_modules/fibers/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:180:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Linux 3.10.0-327.22.2.el7.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/rs-e2e/tests/node_modules/fibers
gyp ERR! node -v v9.8.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
Alpine users please run: `sudo apk add python make g++`
sh: nodejs: command not found
I tryed to figure it out how g++ can be installed on Centos 7 but that's still a mystery. I will use a docker container for now, but if you can provide the compiled version of fibers for node 9 it would be super awesome 🍷 .
Ok everything works after running :
yum install gcc-c++
Do you think that command is mandatory for all my teamates, or this will be fixed ASAP ?
The documented policy is to only support binary versions for production Node versions (the even # ones like 6, 8, etc). Node 9 is an beta/engineering release and thus does not, and will not, have a binary release with it. So either switch to Node 8 or you'll need to add the tools to compile fibers for each team member.
@serut Yes, a build toolchain is necessary for building any binary npm package. Here are the specific requirements of node-gyp
: https://github.com/nodejs/node-gyp/#installation. This library will not attempt to install those tools for you.
You mean that fibers only support LTS node versions ? https://github.com/nodejs/Release#release-schedule
Pretty much yes @serut -- at least the pre-packaged binary module .. As indicated (and you found out) you can install the build tools for any other version if you want to try it on that, but it really is only LTS supported .. I am sure @laverdet is interested in any problems found on non LTS but there won't be (at least historically) the binaries already done ..
Okeyy ! It would be nicer to get that information directly from the repository as compiling dependencies is such a pain in the ass. But I get it.
One last question : where are located fibers pre-packaged binary files ? Inside every fibers version deployed on npm ? Or the package.json tells to node-gyp that it can download the pre-packaged version on the Internet to avoid to compile it ?
fibers is running fine on node 9 btw.
@serut -- if you look at the node_modules and then fibers .. you will see a "bin" directory for the different architectures and the binary files there. So short answer -- all binaries are included for the versions it supports ..