question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Please install 'pg' module manually

See original GitHub issue

I’m in the process of switching to Yarnpkg from npm, and i hit this issue. Was working fine before when i was using npm, but using yarn i get this error.

Error: Please install 'pg' module manually
    at new ConnectionManager (/home/app/kerberos/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:27:13)
    at new PostgresDialect (/home/app/kerberos/node_modules/sequelize/lib/dialects/postgres/index.js:12:28)
    at new Sequelize (/home/app/kerberos/node_modules/sequelize/lib/sequelize.js:233:18)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:33 (3 by maintainers)

github_iconTop GitHub Comments

35reactions
iamkirkbatercommented, Jan 27, 2017

Looks like this has to do with where you have the modules installed.

I was running a globally installed sequelize, and got this error. When I ran ./node_modules/.bin/sequelize from the node_modules folder it ran fine.

So if you’re running sequelize from the globally installed node folder, you’ll need to also have pg installed globally

25reactions
benbonnetcommented, Dec 13, 2016

node v7.2.1, sequelize 3.27.0, pg 6.1.1 returns the same problem when running migrations. Deleted node_modules, reinstalled sequelize and sequelize-cli globally, etc… still stuck with this error. Solved this by installing pg globally (npm install -g pg). Is that a new requirement ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

“Error: Please install pg package manually” when trying to run ...
Just install locally. npm install pg --save.
Read more >
Webpack and “Error: Please install pg package manually”
You are developing a NodeJS + Webpack + Sequelize + pg + pg-hstore application. You compile everything and when you execute your webpack ......
Read more >
nodejs/node - Gitter
along ago, somewhere in the deep space was an error called "please install pg package manually". its a joke. and here are command...
Read more >
'Error: Please install pg package manually' in js console after ...
I've already tried installing pg and pg-hstore both locally and globally. Below is part of my main. js file to test sequelize. If...
Read more >
please install pg package manually
sequelize throw new error please install modulename package manually ... Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found