grunt:从终端运行时找不到命令 [英] grunt: command not found when running from terminal
问题描述
我是Grunt的新手。我正在尝试在我的Mac OSX Lion上配置Grunt。
我按照这里的说明操作,然后创建了一个项目文件夹,其中包含下面的文件。当我尝试通过在终端输入grunt来运行时,我得到命令未找到
。我还修改了我的路径 sudo nano / etc / paths
,希望添加路径可以使任务运行器正常工作,但仍然无法工作。有人可以协助这个吗?
---路径
/ usr / bin
/ bin
/ usr / sbin
/ sbin
/ usr / local / bin
/ usr / local / bin / grunt
---文件
节点模块
Gruntfile.js
package.json
我猜你使用Brew来安装Node,所以这里的指南可能会有帮助 http://madebyhoundstooth.com/blog/install-node-with-homebrew-on-os-x/ 。
您需要确保npm / bin在您的路径中,因为它描述了 export PATH =/ usr / local / share / npm /仓:$ PATH
。这是npm将为安装的软件包安装bin stub的位置。
nano版本也将按照描述这里 http:/ /architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/ ,但可能需要重新启动终端以获取新路径。
I'm new to Grunt. I'm trying to configure Grunt on my Mac OSX Lion.
I followed the instructions here and then created a project folder that contains the files below. When I try to run by typing "grunt" into terminal I get command not found
. I've also modified my paths sudo nano /etc/paths
in the hope that adding the path would make the task runner work but it's still not working. Can someone assist with this please?
---paths
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/local/bin/grunt
--- files
node modules
Gruntfile.js
package.json
I'm guessing you used Brew to install Node, so the guide here might be helpful http://madebyhoundstooth.com/blog/install-node-with-homebrew-on-os-x/.
You need to ensure that the npm/bin is in your path as it describes export PATH="/usr/local/share/npm/bin:$PATH"
. This is the location that npm will install the bin stubs for the installed packages.
The nano version will also work as described here http://architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/ but a restart of Terminal may be required to have the new path picked up.
这篇关于grunt:从终端运行时找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!