首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >zsh:找不到命令:咕噜咕噜

zsh:找不到命令:咕噜咕噜
EN

Stack Overflow用户
提问于 2015-04-24 12:48:37
回答 2查看 2.7K关注 0票数 2

我对gruntjs并不熟悉,我正在尝试让grunt-init模板启动并运行,但是我经常会遇到以下错误:zsh: command not found: grunt-init

当我运行安装时,它向我展示了所有这些,因此它似乎安装得很好。

代码语言:javascript
复制
→ npm install -g grunt-init
/Users/jsturgess/npm-global/bin/grunt-init -> /Users/jsturgess/npm-global/lib/node_modules/grunt-init/bin/grunt-init
grunt-init@0.3.2 /Users/jsturgess/npm-global/lib/node_modules/grunt-init
├── semver@1.0.14
├── colors@0.6.2
├── async@0.2.10
├── hooker@0.2.3
├── lodash@2.4.1
├── prompt@0.1.12 (async@0.1.22, pkginfo@0.3.0, winston@0.5.11)
└── grunt@0.4.5 (which@1.0.9, dateformat@1.0.2-1.2.3, eventemitter2@0.4.14, getobject@0.1.0, rimraf@2.2.8, async@0.1.22, grunt-legacy-util@0.2.0, exit@0.1.2, nopt@1.0.10, lodash@0.9.2, coffee-script@1.3.3, underscore.string@2.2.1, glob@3.1.21, iconv-lite@0.2.11, grunt-legacy-log@0.1.1, js-yaml@2.0.5, minimatch@0.2.14, findup-sync@0.1.3)

我遵循了grunt-init安装说明,创建了~/.grunt-init/目录,并通过给定的命令克隆了jquery模板。

git clone https://github.com/gruntjs/grunt-init-jquery.git ~/.grunt-init/jquery

我需要做什么才能使用咕噜-init命令?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-05-14 15:13:19

通过取消我从本文中所做的npm权限更改来解决这个问题:https://docs.npmjs.com/getting-started/fixing-npm-permissions

票数 1
EN

Stack Overflow用户

发布于 2015-04-24 12:59:44

看起来你在使用OhMyZsh。您需要将Grunt文件添加到$PATH变量中。

光盘到您的主目录中,并找到这个文件.zshrc,并查找

代码语言:javascript
复制
export PATH=

并将其修改如下:

代码语言:javascript
复制
export PATH="path_to_grunt:$PATH"

“:”用作多个路径的分隔符。

你可能要找的是这里:

代码语言:javascript
复制
export PATH="/usr/local/lib/node_modules/grunt-cli/bin/grunt:$PATH"
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29847949

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档