简体   繁体   中英

Installing Grunt on OS X

Here's what I've done so far:

brew install nodejs npm
npm install -g grunt

I've also set up my path to include the proper directories. When I run echo $PATH I get:

/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/lib/node:/usr/local/lib/node_modules:/usr/local/share/npm/bin:/usr/local/share/npm/lib/node_modules:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/landonschropp/.rbenv/shims:/usr/local/sbin:/usr/local/lib/node:/usr/local/lib/node_modules:/usr/local/share/npm/bin:/usr/local/share/npm/lib/node_modules:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin

The installation succeeds without any problems. However, if I try to run grunt I get this error:

zsh: permission denied: grunt

Did I miss a step?

尝试安装命令行界面:

npm install -g grunt-cli

sudo npm install -g grunt-cli然后输入你的密码。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM