2017-08-30 62 views
0

我试图在我的Mac OS 10.12.6中安装sequelize-cli。无法解析续集包

在终端,我做

npm install -g sequelize-cli

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 [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] 

然后,我试过

sequelize model:create --name User --attributes name:string,complete:boolean

无法在/用户/ bheng /网站/ BASE

我甚至与--save因为这post建议尝试解决sequelize包。

npm install -g sequelize-cli --save

我得到了相同的结果。

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 [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] 

sequelize model:create --name User --attributes name:string,complete:boolean

无法在/用户/ bheng /网站/ BASE解决sequelize包

还有什么我应该尝试一下呢?

回答

3

在sequelize-cli package.json文件中,sequelize被称为devdependency,这意味着当您执行npm install sequelize-cli时,它不会安装它。我的猜测是你没有安装sequelize本身,这就是错误所说的。

无法解析sequelize包/用户/ bheng /网站/ BASE

安装sequelize npm install --save sequelize(或全球)和东西应该不错。

PS:Great answer不同依赖关系及其含义

相关问题