2017-08-30 96 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不同依賴關係及其含義

相關問題