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 Express Basics (2015) Developing Express Apps Like a Boss Easily Debug Express (and other node apps)

Dante Harti
PLUS
Dante Harti
Courses Plus Student 2,813 Points

I can't install the node-inspector

I did sudo npm install node-inspector -g

Gives me the gyp-warn and trying to install on temp folder. What should I do?

I did install sudo npm install nodemon -g initially because without sudo it would give me npm error.

jadaml
jadaml
11,593 Points

Might try sudo chown -R $(whoami) ~/.npm then give npm install node-inspector -g

I noticed you did not include an "s" in what you listed above. Not sure if that's what you actually ran or if that was just a typo here. Might double check that as first.

5 Answers

Hi There,

If you are on Windows 8, and if you are encountering an ERR! ...fallback-to-build error, you might try installing an older version of node-inspector, namely v0.7.4, with the command: npm install -g node-inspector@0.7.4

jadaml
jadaml
11,593 Points

sudo chown -R $(whoami) ~/.npm will give you owner permission on npm, you shouldn't need to use sudo after that, just npm install node-inspector -g

Dante Harti
Dante Harti
Courses Plus Student 2,813 Points

@jadaml, thanks for the reply. I have updated the typo error on my question. Thanks for pointing that out.

What's sudo chown -R $(whoami) ~/.npm for? (just curious)

Though I did it, and then tried the npm install node-inspector -g, still npm error.

Should I do a sudo npm install node-inspector -g after the sudo chown?

Thanks.

Dante Harti
Dante Harti
Courses Plus Student 2,813 Points

Hi jadaml, thanks....

I tried... sudo chown -R $USER /usr/local then npm install node-inspector -g

this is based on: http://howtonode.org/introduction-to-npm

It now works. But i'm not sure if this is the proper way since there were some contradicting comments regarding this method based on his blog. But for now, it's good enough for me to move forward. Thanks for replying.

jason chan
jason chan
31,009 Points

npm install node-inspector@0.7.4 -g

windows 8 command that work for me. People saying you have to install python 2.7 and visual studio 2010.

Darryn Smith
Darryn Smith
32,043 Points

For the record:

I tried: sudo chown -R $(whoami) ~/.npm with no success, but then I tried Dante Harti's discovery: sudo chown -R $USER /usr/local and I, too, got node-inspector running after that.

Max Bulygin
Max Bulygin
5,601 Points

using sudo with npm flag --unsafe-perm resolved this issue for me.