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

little problem with UBUNTU 16 LTS #495

Closed
ppKrauss opened this issue Jun 30, 2017 · 10 comments
Closed

little problem with UBUNTU 16 LTS #495

ppKrauss opened this issue Jun 30, 2017 · 10 comments

Comments

@ppKrauss
Copy link
Contributor

npm install -g postgraphql not working, "Error: EACCES: permission denied" (errno -13).

Not good solution: sudo npm install -g postgraphql worked.


Other problem, when executing the command postgraphql

PostGraphQL server listening on port 5000 🚀

  ‣ Connected to Postgres instance postgres://localhost:5432
  ‣ Introspected Postgres schema(s) public
  ‣ GraphQL endpoint served at http://localhost:5000/graphql
  ‣ GraphiQL endpoint served at http://localhost:5000/graphiql

* * *

error: password authentication failed for user "user"

PS: perhaps at Wiki or docs/cli.md, etc. can add some instructions about configurating env.

@benjie
Copy link
Member

benjie commented Jul 1, 2017

Try passing the -c option to give a connection string, e.g. postgres://user:pass@localhost/dbname replacing user/pass with your PostgreSQL credentials and dbname with your database name (e.g. "postgres")

@ppKrauss
Copy link
Contributor Author

ppKrauss commented Jul 1, 2017

Hi @benjie, thanks (!). Hum... using
postgraphql -c postgres://postgres:postgres@localhost:5432/issn
but the error not makes sense, because it is runing with PGPASSWORD=postgres psql -U postgres issnl... Complete message:

PostGraphQL server listening on port 5000 🚀

  ‣ Connected to Postgres instance postgres://localhost:5432/issn
  ‣ Introspected Postgres schema(s) public
  ‣ GraphQL endpoint served at http://localhost:5000/graphql
  ‣ GraphiQL endpoint served at http://localhost:5000/graphiql

* * *

error: database "issn" does not exist
    at Connection.parseE (/usr/local/lib/node_modules/postgraphql/node_modules/pg/lib/connection.js:567:11)
    at Connection.parseMessage (/usr/local/lib/node_modules/postgraphql/node_modules/pg/lib/connection.js:391:17)
    at Socket.<anonymous> (/usr/local/lib/node_modules/postgraphql/node_modules/pg/lib/connection.js:129:22)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:146:16)
    at Socket.Readable.push (_stream_readable.js:110:10)
    at TCP.onread (net.js:523:20)

@benjie
Copy link
Member

benjie commented Jul 1, 2017

Not sure if this was a typo in your message, but issn and issnl are different. Psql accepts a connection string too, so try:

psql postgres://postgres:postgres@localhost:5432/issnl

If that works, change psql for postgraphql -c

@ppKrauss
Copy link
Contributor Author

ppKrauss commented Jul 1, 2017

Hi @benjie ... You is great! This last problem was a typo, sorry. Now I can see... GraphiQL, GraphQL and PostgraphQL, all looks great!!

@atilacamurca
Copy link

About the first error there's an article that explains about global packages installation and permissions in Linux/Unix systems: https://github.com/nodeschool/discussions/wiki/Installing-global-node-modules-(Linux-and-Mac)

@ppKrauss
Copy link
Contributor Author

ppKrauss commented Jul 2, 2017

Hi @atilacamurca, good tutorial for installations (!), I think that ideal is to citate a link in the README ... something as "check this link in case of problem with permissions".

@benjie
Copy link
Member

benjie commented Jul 2, 2017

A PR to add a TROUBLESHOOTING.md file to the root with problems and solutions would be welcome.

@ppKrauss
Copy link
Contributor Author

ppKrauss commented Jul 2, 2017

Hi @benjie , I tryed, but Travis generated an error.

@benjie
Copy link
Member

benjie commented Jul 2, 2017

Please ignore the CI error; someone needs to fix it on master.

@benjie
Copy link
Member

benjie commented Jul 9, 2017

Closing this since the docs are now merged

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

3 participants