node-gyp: node-gyp fails with node 8 on travis

See the following build history: https://travis-ci.org/ProjectMirador/mirador/builds

This has been a common problem for our contributors who attempt to clone and run the project with npm install without explicitly setting the node version, and is also an extremely commonly googled error that never seems to have gone away. Most of the time upgrading above node 6 resolves the issue, but other times it requires deleting binaries. What is the root of this problem and what configuration can I implement that will stop this happening for our contributors (and Travis)?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (12 by maintainers)

Commits related to this issue

Most upvoted comments

V8@5.9 requiring a C++11 compiler

We’ve been requiring that for ages, though (since at least Node 4, I think?)

~For posterity: node versions are not ABI backwards compatible so the version of nan used is incompatible with node@8.x~ For posterity, travis needs to be told explicitly to use GCC 4.8 with the following in the .travis.yml

env:
  - CXX=g++-4.8
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8

As per https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Node.js-v4-(or-io.js-v3)-compiler-requirements