Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Serge Honderdos
Serge Honderdos
8,918 Points

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?

Serge Honderdos
Serge Honderdos
8,918 Points

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?