Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

env: node: Permission denied when trying to install Grunt via homebrew

I'm trying to install node with these instructions:

http://thechangelog.com/install-node-js-with-homebrew-on-os-x/

After this step:

npm install -g grunt-cli

I get this error: env: node: Permission denied.

I'm new to this stuff and have no idea what's wrong. I'd greatly appreciate any help on this issue.

My operating system is 10.8.5

Thank you.

3 Answers

Try running: sudo npm install -g grunt-cli

sudo stands for Super User Do. Effectively, sudo allows a user to run a program as another user (most often the root user).

Thanks so much Serge,

I tried with sudo and it seems to be installed.

"Which grunt" command shows me the file path to where it's installed.

How ever, when I try: grunt --version

I get the same env: node: Permission denied.

Any idea why I get the error?

Whenever you get a "Permission denied", just put sudo in front.

I can't get the version information even if I use sudo in my command.

What could be the cause of this?