-bash: Sequelize: Command Not Found


Answer :

The reason is: sequelize is not installed globally on your cli. To get sequelize access to all your cli just do.

npm install -g sequelize-cli 

The '-g' means global this will allow you to access sequelize command anywhere in your app directory.

After that you can do eg: sequelize model:generate --name User --attributes firstName:string,lastName:string,email:string,password:string


Had the same issue, then noted that sequelize-cli is the way to go ahead.

npm install -g sequelize-cli 

I would like to answer my own question. The global npm install path was wrong for my computer.

npm config get prefix

Then I ran to put the path where it should be. This problem gave me a lot of head aches. Hope it helps someone.

npm config set prefix /usr/local


Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?