grunt not found .也不知道操作了啥 grunt 竟然不认了

2015-09-09 11:49:10 +08:00
 nuc093

mytodo grunt
zsh: command not found: grunt
➜ mytodo npm instal -g grunt

npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/npmconf requires semver@'2' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/semver,
npm WARN unmet dependency which is version 4.3.6
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/npmconf requires uid-number@'0.0.5' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/uid-number,
npm WARN unmet dependency which is version 0.0.6
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data requires github-url-from-username-repo@'^0.2.0' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/github-url-from-username-repo,
npm WARN unmet dependency which is version 1.0.2
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data requires semver@'2 || 3' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/semver,
npm WARN unmet dependency which is version 4.3.6
npm WARN unmet dependency /usr/local/lib/node_modules/phonegap/node_modules/phonegap-build requires colors@'0.6.x' but will load

Path to your oh-my-zsh configuration.

ZSH=$HOME/.oh-my-zsh

Set name of the theme to load.

Look in ~/.oh-my-zsh/themes/

Optionally, if you set this to "random", it'll load a random theme each

time that oh-my-zsh is loaded.

ZSH_THEME="robbyrussell"

Example aliases

alias zshconfig="mate ~/.zshrc"

alias ohmyzsh="mate ~/.oh-my-zsh"

Set to this to use case-sensitive completion

CASE_SENSITIVE="true"

Uncomment this to disable bi-weekly auto-update checks

DISABLE_AUTO_UPDATE="true"

Uncomment to change how often before auto-updates occur? (in days )

export UPDATE_ZSH_DAYS=13

Uncomment following line if you want to disable colors in ls

DISABLE_LS_COLORS="true"

Uncomment following line if you want to disable autosetting terminal title.

DISABLE_AUTO_TITLE="true"

Uncomment following line if you want to disable command autocorrection

DISABLE_CORRECTION="true"

Uncomment following line if you want red dots to be displayed while waiting for completion

COMPLETION_WAITING_DOTS="true"

Uncomment following line if you want to disable marking untracked files under

VCS as dirty. This makes repository status check for large repositories much,

much faster.

DISABLE_UNTRACKED_FILES_DIRTY="true"

"~/.zshrc" 81L, 2537C
npm WARN unmet dependency /usr/local/lib/node_modules/phonegap/node_modules/colors,
npm WARN unmet dependency which is version 0.6.0-1
npm WARN unmet dependency /usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/node_modules/connect/node_modules/multiparty/node_modules/stream-counter requires readable-stream@'~1.1.8' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/node_modules/connect/node_modules/multiparty/node_modules/readable-stream,
npm WARN unmet dependency which is version 1.1.13-1
npm WARN unmet dependency /usr/local/lib/node_modules/phonegap/node_modules/phonegap-build/node_modules/qrcode-terminal requires colors@'*' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/phonegap/node_modules/colors,
npm WARN unmet dependency which is version 0.6.0-1
npm WARN unmet dependency /usr/local/lib/node_modules/phonegap/node_modules/prompt/node_modules/winston requires colors@'0.x.x' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/phonegap/node_modules/colors,
npm WARN unmet dependency which is version 0.6.0-1
grunt@0.4.5 /usr/local/lib/node_modules/grunt
├── dateformat@1.0.2-1.2.3
├── which@1.0.9
├── eventemitter2@0.4.14
├── getobject@0.1.0
├── colors@0.6.2
├── rimraf@2.2.8
├── async@0.1.22
├── hooker@0.2.3
├── grunt-legacy-util@0.2.0
├── exit@0.1.2
├── lodash@0.9.2
├── nopt@1.0.10 (abbrev@1.0.7 )
├── coffee-script@1.3.3
├── underscore.string@2.2.1
├── minimatch@0.2.14 (sigmund@1.0.1, lru-cache@2.6.5 )
├── iconv-lite@0.2.11
├── glob@3.1.21 (inherits@1.0.2, graceful-fs@1.2.3 )
├── findup-sync@0.1.3 (glob@3.2.11, lodash@2.4.2 )
├── js-yaml@2.0.5 (esprima@1.0.4, argparse@0.1.16 )
└── grunt-legacy-log@0.1.2 (grunt-legacy-log-utils@0.1.1, underscore.string@2.3.3, lodash@2.4.2 )
➜ mytodo grunt
zsh: command not found: grunt

5778 次点击
所在节点    Node.js
4 条回复
nuc093
2015-09-09 11:51:21 +08:00
➜ mytodo which npm
/usr/local/bin/npm
➜ mytodo vi ~/.zshrc

export PATH=/usr/local/bin/npm:$PATH

➜ mytodo source ~/.zshrc
➜ mytodo grunt serve
zsh: command not found: grunt
nuc093
2015-09-09 12:10:05 +08:00
OK 解决了。

sudo npm install -g yo bower grunt-cli gulp
aisk
2015-09-09 12:48:09 +08:00
npm instal -g grunt-cli
FrankFang128
2015-09-09 13:00:37 +08:00
快换 gulp
grunt cli 坑了一批人

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/219329

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX