节点程序包(咕噜声)安装,但不可用 [英] Node package ( Grunt ) installed but not available
问题描述
我想建立一个 GitHub的jQuery的-UI库使用咕噜
,但运行后 NPM安装
我仍然无法根据的自述文件。它只是给无命令'咕噜'发现
:
I'm trying to build a github jquery-ui library using grunt
, but after running npm install
I still can't run the command according to the readme file. It just gives No command 'grunt' found
:
james@ubuntu:~/Documents/projects/ad2/lib/jquery-ui$ grunt build
No command 'grunt' found, did you mean:
Command 'grun' from package 'grun' (universe)
grunt: command not found
james@ubuntu:~/Documents/projects/ad2/lib/jquery-ui$ npm ls
jquery-ui@1.9.0pre /home/james/Documents/projects/ad2/lib/jquery-ui
├─┬ grunt@0.3.9
│ ├── async@0.1.18
│ ├── colors@0.6.0-1
│ ├─┬ connect@1.8.7
│ │ ├── formidable@1.0.9
│ │ ├── mime@1.2.5
│ │ └── qs@0.5.0
│ ├── dateformat@1.0.2-1.2.3
│ ├─┬ glob-whatev@0.1.6
│ │ └─┬ minimatch@0.2.4
│ │ └── lru-cache@1.0.6
│ ├─┬ gzip-js@0.3.1
│ │ ├── crc32@0.2.2
│ │ └── deflate-js@0.2.2
│ ├── hooker@0.2.3
│ ├─┬ jshint@0.5.9
│ │ ├── argsparser@0.0.6
│ │ └─┬ minimatch@0.2.4
│ │ └── lru-cache@1.0.6
│ ├─┬ nodeunit@0.6.4
│ │ ├── tap-assert@0.0.10
│ │ └─┬ tap-producer@0.0.1
│ │ ├── inherits@1.0.0
│ │ ├── tap-results@0.0.2
│ │ └── yamlish@0.0.5
│ ├─┬ nopt@1.0.10
│ │ └── abbrev@1.0.3
│ ├─┬ prompt@0.1.12
│ │ ├── pkginfo@0.2.3
│ │ └─┬ winston@0.5.11
│ │ ├── eyes@0.1.7
│ │ ├─┬ loggly@0.3.11
│ │ │ └── timespan@2.2.0
│ │ └── stack-trace@0.0.6
│ ├── semver@1.0.13
│ ├─┬ temporary@0.0.2
│ │ └── package@1.0.0
│ ├── uglify-js@1.0.7
│ ├── underscore@1.2.4
│ └── underscore.string@2.1.1
├── grunt-compare-size@0.1.4
├─┬ grunt-css@0.2.0
│ ├── csslint@0.9.8
│ └── sqwish@0.2.0
├── grunt-html@0.1.1
├── request@2.9.153
├─┬ rimraf@2.0.1
│ └── graceful-fs@1.1.8
└─┬ testswarm@0.2.2
└── request@2.9.202
我很困惑,我错过什么吗?
I'm confused, what am I missing please?
推荐答案
命令行工具不包括在(在撰写本文时0.4)的最新版本咕噜,而不是你需要单独安装它们。
The command line tools are not included with the latest version of Grunt (0.4 at time of writing) instead you need to install them separately.
这是一个好主意,因为这意味着你可以有不同的版本咕噜的在不同的项目运行,但仍用漂亮简洁的咕噜
命令来运行它们。
This is a good idea because it means you can have different versions of Grunt running on different projects but still use the nice concise grunt
command to run them.
所以先安装全球繁重的CLI工具:
So first install the grunt cli tools globally:
npm install -g grunt-cli
(或可能 sudo的NPM安装-g咕噜-CLI
)。
您可以建立的合作,通过键入咕噜--version
You can establish that's working by typing grunt --version
现在您可以安装最新版本咕噜地方到项目中。因此,从项目的位置...
Now you can install the current version of Grunt local to your project. So from your project's location...
npm install grunt --save-dev
的保存-dev的
开关不是绝对必要的,但是是一个好主意,因为它会在它的package.json devDependencies部分作为开发模块只哼了一声标记
The save-dev
switch isn't strictly necessary but is a good idea because it will mark grunt in its package.json devDependencies section as a development only module.
这篇关于节点程序包(咕噜声)安装,但不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!