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

JavaScript npm Basics (retiring) Installing Packages with npm Installing Global Packages

Trouble installing http-server globally

I've installed it locally, but I'm getting the access error when I try to install globally.

I already had npm installed but when I read the guide for using homebew I went ahead and installed homebrew too. Presumably I have two installations of node but something is stopping it from installing globally.

Any help is appreciated.

1 Answer

Seokhyun Wie
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Seokhyun Wie
Full Stack JavaScript Techdegree Graduate 21,606 Points

Hi Andrew, It's already been 4 months you've asked and most likely I guess you've already found an answer. I've tried several solutions that are posted on Stack Overflow or through the link given here onTreehouse, but most them didn't work for me. I found one solution and it worked for me perfectly, using SUDO(Super User DO) option (you can execute a command as a superuser)

$ sudo npm install http-server -g

and it'll ask you to type in your password, after you type it, it should work. Hope you find it helpful.