Node.JS 4.0 has been released and currently needs gcc 4.8 or newer to compile certain modules. The current circle image uses gcc version 4.6. Because of this you might see the following error when trying to use Node.JS 4.0:
This version of node/NAN/v8 requires a C++11 compiler
As a workaround, in order to use Node.JS 4.0 you will need to add the following to your circle.yml
file.
machine:
node:
version: 4.0.0
dependencies:
override:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get update
- sudo apt-get install -y gcc-4.9 g++-4.9
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 10
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 10
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
test:
override:
- gcc --version
Credits: Originally posted by @kimh