I'm trying to install sequelize-cli in my Mac OS 10.12.6.
In Terminal, I did
npm install -g sequelize-cli
I got
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
/usr/local/bin/sequelize -> /usr/local/lib/node_modules/sequelize-cli/bin/sequelize
/usr/local/lib
└── [email protected]
Then, I tried
sequelize model:create --name User --attributes name:string,complete:boolean
I got
Unable to resolve sequelize package in /Users/bheng/Sites/BASE
I even try with the --save
as this post suggested.
npm install -g sequelize-cli --save
I got same result.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
/usr/local/bin/sequelize -> /usr/local/lib/node_modules/sequelize-cli/bin/sequelize
/usr/local/lib
└── [email protected]
sequelize model:create --name User --attributes name:string,complete:boolean
Unable to resolve sequelize package in /Users/bheng/Sites/BASE
What else should I try ?
In sequelize-cli package.json file, sequelize is mentioned as a devdependency which means it does not install it when you do npm install sequelize-cli
. My guess is you have not installed sequelize itself and this is what the error says.
Unable to resolve sequelize package in /Users/bheng/Sites/BASE
install sequelize npm install --save sequelize
(or global) and things should be good.
PS: Great answer on different dependencies and what they mean
I had the same issue. I installed sequelize-cli
forgetting to add sequelize
itself:
npm install sequelize
You will need to install sequelize globally.
npm install -g sequelize
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With