Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error when installing on travis #51

Open
tomoakley opened this issue Feb 27, 2017 · 1 comment
Open

Build error when installing on travis #51

tomoakley opened this issue Feb 27, 2017 · 1 comment

Comments

@tomoakley
Copy link

tomoakley commented Feb 27, 2017

Hi, I'm getting a build error when installing libpq on Travis - specifically node-gyp rebuild. I'm not using pq-native or libpq directly; I'm using Sequelize and Postgres, which I guess implements your packages. Here is the error:

make: Leaving directory `/home/travis/build/tomoakley/xysti/node_modules/libpq/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/travis/.nvm/versions/node/v6.1.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 3.13.0-103-generic
gyp ERR! command "/home/travis/.nvm/versions/node/v6.1.0/bin/node" "/home/travis/.nvm/versions/node/v6.1.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/travis/build/tomoakley/xysti/node_modules/libpq
gyp ERR! node -v v6.1.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the libpq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs libpq
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls libpq
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /home/travis/build/tomoakley/xysti/npm-debug.log
npm ERR! code 1

I'm a bit of a newbie to devops/CI so not really sure what you want or need to see to help debug the issue, but happy to provide any info from Travis or my build/code. It's failing on all versions of Node which I have Travis set up to run (0.12, 5, 6, 6.1, stable).

Pretty sure I should be using Docker to do this, however I'm currently just pushing my code to Github which Travis is picking up to run the build; when running the production build locally I see no errors related to libpq. I will go and set up a Docker container and update this issue if I see any differences.

Before the errors above, there is also about 500 additional lines of logging - I can post this if it's useful but they aren't marked as errors by npm so I'll leave it out for now.

In my .travis.yml file I have Postgres set up:

language: node_js

node_js:
  - "0.12"
  - "5"
  - "6"
  - "6.1"
  - "stable"

sudo: required
dist: precise
addons:
    postgresql: "9.5"
services:
    - postgresql

script:
  - npm run lint
  - npm test
@Daniel15
Copy link

Can you provide the npm-debug.log file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants