I have installed sequelize cli using the following command
npm install -g sequelize-cli
It works fine on localhost
But when I deploy to heroku and try to run migrations
I get error
sequelize: command not found
I have installed sequelize cli using the following command
npm install -g sequelize-cli
It works fine on localhost
But when I deploy to heroku and try to run migrations
I get error
sequelize: command not found
sequelize-cli is installed globally on your system so it's working on your system without any problem.script that is installed on your system, on the Heroku.Heroku CLI is made to accomplish the operation related to Heroku dynos only i.e. you can only run commands that are predefined in Heroku CLIHeroku you have to define it in package and when Heroku will deploy your app it will automatically run that script.If you want to run db:migrate using sequelize-cli then do the following steps:
sequelize-cli as a dependency in your package.jsonmigrate: "sequelize db:migrate" in the scripts.I am not sure for what purpose you want to run this command. But to run a script on Heroku you have to define it in your package and Heroku will do the rest.
As for me I was trying to run sequelize DB migration to heroku postgress database. As per earlier documentations, or maybe what you tried, was to run the command heroku run sequelize db:migrate
This however is what seems to work now heroku run npx sequelize-cli db:migrate