Unable to resolve sequelize package

Unable to resolve sequelize package

Questions : Unable to resolve sequelize package

611

I’m trying to install sequelize-cli in my in4codes_macos Mac OS 10.12.6.

In Terminal, I did

npm install -g sequelize-cli

I got

npm WARN deprecated [email protected]2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated [email protected]0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated [email protected]1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^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]2.8.0 

Then, I tried

sequelize model:create –name User in4codes_macos –attributes name:string,complete:boolean

I got

Unable to resolve sequelize package in in4codes_macos /Users/bheng/Sites/BASE

I even try with the –save as this post in4codes_macos suggested.

npm install -g sequelize-cli –save

I got same result.

npm WARN deprecated [email protected]2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated [email protected]0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated [email protected]1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^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]2.8.0 

sequelize model:create –name User in4codes_macos –attributes name:string,complete:boolean

Unable to resolve sequelize package in in4codes_macos /Users/bheng/Sites/BASE

What else should I try ?

Total Answers 7
32

Answers 1 : of Unable to resolve sequelize package

In sequelize-cli package.json file, in4codes_npm-install sequelize is mentioned as a in4codes_npm-install devdependency which means it does not in4codes_npm-install install it when you do npm install in4codes_npm-install sequelize-cli. My guess is you have not in4codes_npm-install installed sequelize itself and this is in4codes_npm-install what the error says.

Unable to resolve sequelize package in in4codes_npm-install /Users/bheng/Sites/BASE

install sequelize npm install –save in4codes_npm-install sequelize (or global) and things should in4codes_npm-install be good.

PS: Great answer on different in4codes_npm-install dependencies and what they mean

0

1

Answers 2 : of Unable to resolve sequelize package

I had the same issue. I installed in4codes_npm-install sequelize-cli forgetting to add in4codes_npm-install sequelize itself:

npm install sequelize

0

4

Answers 3 : of Unable to resolve sequelize package

You will need to install sequelize in4codes_npm-install globally.

npm install -g sequelize

0

1

Answers 4 : of Unable to resolve sequelize package

you can try this one

npm install –save-dev sequelize in4codes_npm-install sequelize-cli

npx sequelize-cli init

Once you get models migrations folders, in4codes_npm-install means sequelize is working.

0

2

Answers 5 : of Unable to resolve sequelize package

First you have need to install sequelize in4codes_npm-install package, after then execute cli command.

0

1

Answers 6 : of Unable to resolve sequelize package

I had a similar case where when I was in4codes_npm-install trying to run any sequelize command.

ie. sequelize init or sequelize –help

I would get the error:

Unable to resolve sequelize package in in4codes_npm-install <my-project-directory>

None of the solutions above where in4codes_npm-install helping my case but after farther in4codes_npm-install digging I found this article talking in4codes_npm-install about the importance of the order in in4codes_npm-install which one installs dependencies.

I had installed my my development in4codes_npm-install dependencies first (sequelize-cli before in4codes_npm-install sequelize) and that’s why it wasn’t in4codes_npm-install working.

Because this is a new project I just in4codes_npm-install removed my yarn files and the in4codes_npm-install package.json (left my other files in4codes_npm-install untouched) and started over and this in4codes_npm-install time I did:

  1. yarn init
  2. yarn add <my dependencies>
  3. yarn add --dev <my development dependencies>

This solved my issue.

0

2

Answers 7 : of Unable to resolve sequelize package

Yes. This is “normal” the CLI will try in4codes_npm-install to find the sequelize package in your in4codes_npm-install current working directory and/or in the in4codes_npm-install node paths. So you could either install in4codes_npm-install the package in your local dir or in any in4codes_npm-install parent directory or in the global space.

more answers

0