mozilla / makedrive

[RETIRED] Webmaker Filesystem
Mozilla Public License 2.0
351 stars 33 forks source link

node-postgres (pg) fails if postgres not installed #473

Closed gideonthomas closed 9 years ago

gideonthomas commented 9 years ago

I just tried to npm install and it completed, but somewhere in the middle I got this:

> pg@3.6.3 install /Users/gideonthomas/makedrive/node_modules/filer-sql/node_modules/pg
> node-gyp rebuild || (exit 0)

/bin/sh: pg_config: command 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/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/gideonthomas/makedrive/node_modules/filer-sql/node_modules/pg
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok

Seems to be a postgres problem. Coz from research it apparently searches for that command in the $PATH env variable.

Is this normal to happen?

cc @humphd @alicoding

humphd commented 9 years ago

I filed https://github.com/brianc/node-postgres/issues/684 upstream. Try installing postgres and see what happens.

humphd commented 9 years ago

I think we should consider moving filer-sql and filer-s3 to optionalDependencies in package.json, so these failures don't seem so bad.

gideonthomas commented 9 years ago

installing postgres seems to have solved it

alicoding commented 9 years ago

Fixed by https://github.com/mozilla/makedrive/commit/4c36b776556d006446708854a46e383b87dd3524