Upgraded Ubuntu version to the latest LTS

I’m having trouble with NodeJS and testing with Node 4.0, the reason being that several dependencies can’t compile under Ubuntu 12.04, which is not even supported by Ubuntu anymore.

Is there a way to get a container which is updated to Ubuntu 14.04, the latest LTS?

This is likely an issue related to GCC. Have you read this post? Following the steps there should get your dependencies to compile.

I wonder if I could get some help on it. Here’s my circleci.yml

machine:
  node:
    version: 4.0.0
  services:
    - postgresql


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
    - npm install -g bower mocha karma gulp knex shipit-cli
    - npm rebuild node-sass
    - bower install
    - npm install
    - gulp build

database:
  override:
    - shipit circleci migrate:remigrate

When running gulp build which builds my project, gulp dies unexpectedly: gulp build died unexpectedly. I’ve tested this locally and it works fine. When I rerun the container with SSH access and login, none of the globally installed modules work. Running any of the commands simply ends with a “segmentation fault (core dumped)”.

Any ideas on that?

Not sure if this is any use for you now, however your answer helped me so I will let you know what worked for me:

In your above instead of gulp build I have referenced directly to the gulp path and it worked.

  • ./node_modules/.bin/gulp build

Hope it helps.