2013-05-07 61 views
0

我有以下內容的package.json:NPM install命令無所事事

{ 
    "name": "useless-app", 
    "version": "1.0.0", 
    "dependencies": {}, 
    "devDependencies": { 
    "grunt": "~0.4.1", 
    "grunt-contrib-copy": "~0.4.0", 
    "grunt-contrib-concat": "~0.2.0", 
    "grunt-contrib-coffee": "~0.6.6", 
    "grunt-contrib-jst": "~0.5.0", 
    "grunt-contrib-uglify": "~0.2.0", 
    "grunt-contrib-compass": "~0.2.0", 
    "grunt-contrib-jshint": "~0.4.3", 
    "grunt-contrib-cssmin": "~0.6.0", 
    "grunt-contrib-connect": "0.3.0", 
    "grunt-contrib-clean": "0.4.0", 
    "grunt-contrib-htmlmin": "0.1.3", 
    "grunt-contrib-imagemin": "0.1.4", 
    "grunt-contrib-livereload": "0.1.2", 
    "grunt-mocha": "~0.3.1", 
    "grunt-bower-requirejs": "~0.4.1", 
    "grunt-usemin": "~0.1.10", 
    "grunt-requirejs": "~0.3.5", 
    "grunt-regarde": "~0.1.1", 
    "grunt-open": "~0.2.0", 
    "matchdep": "~0.1.2" 
    }, 
    "engines": { 
    "node": ">=0.8.0" 
    } 
} 

這是什麼約曼專爲我的標準。當我打電話npm installnpm install -g我沒有得到任何行動,只是這樣的:

[email protected] ~/Sites/Backbone/Yeoman$ sudo npm install -g 
[email protected] /usr/local/lib/node_modules/useless-app 

在這一點上,我有點期待的應用程序的列表下載並安裝。無論哪種方式,運行咕嚕(列表中的項目之一),在下面的測試此,結果:

[email protected] ~/Sites/Backbone/Yeoman$ grunt 
-bash: grunt: command not found 

任何想法,爲什麼這些東西不安裝?

我試過用這些命令使用sudo,結果總是一樣的。

回答

3

你安裝了grunt-cli嗎?請記住,在最新版本的Grunt中,您需要使用grunt-cli來執行grunt命令。

嘗試sudo npm install -g grunt-cli

最好的問候,凱文 。