node-gyp rebuild error
See original GitHub issueI’m not sure if this is an issue with binding.gyp or if it’s an issue with node-gyp, but here are the results of installing pg.
$ npm install pg --save npm http GET https://registry.npmjs.org/pg npm http 304 https://registry.npmjs.org/pg npm http GET https://registry.npmjs.org/generic-pool/2.0.3 npm http GET https://registry.npmjs.org/buffer-writer/1.0.0 npm http 304 https://registry.npmjs.org/generic-pool/2.0.3 npm http 304 https://registry.npmjs.org/buffer-writer/1.0.0 npm http GET https://registry.npmjs.org/cloned/0.0.1 npm http GET https://registry.npmjs.org/async npm http 304 https://registry.npmjs.org/cloned/0.0.1 npm http 304 https://registry.npmjs.org/async npm http GET https://registry.npmjs.org/rmdir npm http 304 https://registry.npmjs.org/rmdir > pg@2.8.2 install /home/username/node_projects/writer/node_modules/pg > node-gyp rebuild || (exit 0) /bin/sh: 1: pg_config: not found gyp: Call to 'pg_config --libdir' returned exit status 127. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:424:16) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12) gyp ERR! System Linux 3.8.0-19-generic gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/username/node_projects/writer/node_modules/pg gyp ERR! node -v v0.10.20 gyp ERR! node-gyp -v v0.10.10 gyp ERR! not ok pg@2.8.2 node_modules/pg ├── generic-pool@2.0.3 └── buffer-writer@1.0.0 (async@0.2.9, cloned@0.0.1)
Issue Analytics
- State:
- Created 10 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
trying to 'npm install', getting node-gyp rebuild errors #809
Follow these steps to resolve the issue. 1: Make sure you have build-tools installed. ... 3: Delete package-lock.json and node modules folder and ......
Read more >Node 10 - `node-gyp rebuild` error during npm install
Resolved the issue by updating npm to latest version & running npm rebuild.
Read more >Npm install command failing with message "could not find ...
When I run the npm install command, npm starts downloading the dependencies. But then, suddenly, it stops with the error: npm ERR! code...
Read more >npm build error "node-gyp rebuild" error (#2768) - GitLab
gyp : Call to 'node -p "require('node-addon-api').include"' returned exit status 0 while in binding.gyp. while trying to load binding.gyp gyp ...
Read more >How to Handle Node-Gyp Rebuild Failing on Mac
How to Solve the Node-gyp Rebuild Error · Restart your computer to get rid of any temporary bugs that might be affecting your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ran into this problem on OSX (10.11). The solution was to
creds to http://stackoverflow.com/questions/32948935/gyp-failing-when-installing-pg-native AND
creds to http://stackoverflow.com/questions/21713680/can-not-install-node-postgres
I definitely think this would be worth adding to the docs
Hey @brianc I didn’t actually get the C bindings to work (Ubuntu server) - I was hoping you could shed some light and I would could do the dredge work of documenting. Instead I wound up using pure JS - which is totally fine for the time-being.