sequelize: ERROR: Please install sqlite3 package manually

after installing sequelize-cli and express-generator npm install -g sequelize-cli express-generator

I create my express app with: express --view=pug todos-manager

Then I installed sequelize and sqlite3

cd todos-manager && npm install
npm install --save sequelize
npm install --save sqlite3

I initialized sequelize sequelize init and corrected config/config.json with data to connect to my sqlite db

Then created a model and migtation sequelize model:create --name Todo --attributes title:string,description:string

Running this sequelize db:migrate

I got the error:

Sequelize CLI [Node: 10.16.0, CLI: 5.5.0, ORM: 5.8.12]

Loaded configuration file "config\config.json".
Using environment "development".

ERROR: Please install sqlite3 package manually

I’ve tried to rebuild, with no success.

Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 25 (2 by maintainers)

Most upvoted comments

i had same issue, npm rebuild helped me

try npm i sqlite3 -D && rm -rf node_modules && npm i && npm rebuild these are all steps which come in my mind 😃

For those who still have this error, I installed sqlite3 globally as a workaround and it worked npm i -g sqlite3

I got this error

"rm" it is not recognized as an internal or external command,
 an executable program or a batch file.

@elenaaralla Try the following:

  1. npm i -g rimraf
  2. npm i -D sqlite3
  3. rimraf node_modules
  4. npm i

Hi all,

the error does not occur if I use the statement:

npx sequelize-cli db:migrate

instead of

sequelize db:migrate

and migration completes successful!

Thanks to all.

Ran into the same Issue. However, it began working for me after running npm rebuild

Update your node version to latest. Worked for me.

nvm i stable

Ran into the same Issue. However, it began working for me after running npm rebuild

This worked for me, thank you

@eugene-matvejev : yes, windows 10 virtual machine

I tryed… no success.

this is the cmd output: sequelizetest.txt

Thank you, I’ll try it asap.

Have a nice day.