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

install pg module manually #109

Closed
kissmygritts opened this issue Jan 3, 2017 · 3 comments
Closed

install pg module manually #109

kissmygritts opened this issue Jan 3, 2017 · 3 comments

Comments

@kissmygritts
Copy link

kissmygritts commented Jan 3, 2017

When running sequelize-auto ... I received this error.

/usr/local/lib/node_modules/sequelize-auto/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:27
      throw new Error('Please install \'' + (sequelize.config.dialectModulePath || 'pg') + '\' module manually');
      ^

Error: Please install 'pg' module manually
    at new ConnectionManager (/usr/local/lib/node_modules/sequelize-auto/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:27:13)
    at new PostgresDialect (/usr/local/lib/node_modules/sequelize-auto/node_modules/sequelize/lib/dialects/postgres/index.js:12:28)
    at new Sequelize (/usr/local/lib/node_modules/sequelize-auto/node_modules/sequelize/lib/sequelize.js:233:18)
    at new AutoSequelize (/usr/local/lib/node_modules/sequelize-auto/lib/index.js:13:24)
    at Object.<anonymous> (/usr/local/lib/node_modules/sequelize-auto/bin/sequelize-auto:65:12)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:420:7)
    at startup (bootstrap_node.js:139:9)
    at bootstrap_node.js:535:3

Similar to this issue sequelize/sequelize#6907, however I used npm to install my dependencies.

node : v7.3.0
npm : v3.10.10

and dependencies from package.json

...
  "dependencies": {
    "express": "^4.14.0",
    "pg": "^6.1.2",
    "sequelize": "^3.28.0"
  }
...

Installing pg globally solved the problem.

@iamkirkbater
Copy link

I left a similar comment on #6907, if you install sequelize globally, and then try to reference the locally installed node_modules/pg package, it won't work. You have to install both globally or run the sequelize command from the node modules folder, ./node_modules/.bin/sequelize [command].

@steveschmitt
Copy link
Collaborator

steveschmitt commented Jul 6, 2020

I think this is fixed in sequelize-auto@0.5.0, because it uses the already-installed sequelize via peerDependencies
Please try it and close the issue if so. Thanks!

@steveschmitt
Copy link
Collaborator

Fixed in sequelize-auto@0.5.1.

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