V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
nuc093
V2EX  ›  Node.js

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

  •  
  •   nuc093 · 2015-09-09 11:49:10 +08:00 · 5759 次点击
    这是一个创建于 3158 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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
    [email protected] /usr/local/lib/node_modules/grunt
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected] ([email protected] )
    ├── [email protected]
    ├── [email protected]
    ├── [email protected] ([email protected], [email protected] )
    ├── [email protected]
    ├── [email protected] ([email protected], [email protected] )
    ├── [email protected] ([email protected], [email protected] )
    ├── [email protected] ([email protected], [email protected] )
    └── [email protected] ([email protected], [email protected], [email protected] )
    ➜ mytodo grunt
    zsh: command not found: grunt

    4 条回复    2015-09-09 13:00:37 +08:00
    nuc093
        1
    nuc093  
    OP
       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
        2
    nuc093  
    OP
       2015-09-09 12:10:05 +08:00
    OK 解决了。

    sudo npm install -g yo bower grunt-cli gulp
    aisk
        3
    aisk  
       2015-09-09 12:48:09 +08:00
    npm instal -g grunt-cli
    FrankFang128
        4
    FrankFang128  
       2015-09-09 13:00:37 +08:00 via Android
    快换 gulp
    grunt cli 坑了一批人
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2372 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 12:27 · PVG 20:27 · LAX 05:27 · JFK 08:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.