8

I am referencing the sequelize.js documentation at: http://sequelizejs.com/documentation#migrations-the-binary

After running 'sequelize -V', I receive:

$ sequelize -V
sequelize: command not found

I have searched online and cannot find any references on how to install the binary

thaspius
  • 1,135
  • 3
  • 17
  • 33

4 Answers4

18

The CLI has moved to sequelize-cli:

npm install -g sequelize-cli

https://github.com/sequelize/cli

elado
  • 8,510
  • 9
  • 51
  • 60
1

If you install locally, there are links to binaries at ./node_modules/.bin . This path applies to all your local binaries, and you can output this on your CLI with npm bin .

You can also do ls -laF node_modules/.bin to view where the links point to.

See this stack question for more

Community
  • 1
  • 1
sooks
  • 688
  • 1
  • 8
  • 20
0

If anyone is still struggling with all this, let me tell you now in v6 of sequelize you can just do:

yarn sequelize init

If npm probably this command will be helpfull (though not tested)

npx sequelize init

NOTE: Later one is not tested so I'm not sure about it.

-2

After installing sequelize.js via

npm install sequelize

The sequelize binary will be located in your node_modules/sequelize/bin folder. The sequelize binary can be accessed directly or by adding this folder to your environment.

Try "./your/path/node_modules/sequelize/bin/sequlize -V" to verify.

thaspius
  • 1,135
  • 3
  • 17
  • 33
  • 2
    All you need to do is add the `-g` flag when installing it. – Blender Aug 11 '13 at 03:00
  • Neither one of these facts is documented by sequelize's site. Wasted 30 minutes poking around to find it. Following through their site's docs, the installation step doesn't use the global flag. – thaspius Aug 11 '13 at 03:07
  • 2
    @thaspius It would probably help if they mentioned the different installation as well, but it's primarily documented by NPM itself: [`npm-folders(5)`](https://npmjs.org/doc/files/npm-folders.html). – Jonathan Lonowski Aug 11 '13 at 04:16
  • Its worth noting that at the actual time of the posting, I could not figure the issue out and this answer was actually what fixed it. Downvoting what was at that time an actual legitimate answer seems absurd... – thaspius Dec 22 '15 at 03:00