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

Databases Mongo Basics Go Further With Mongo Updating Data

Jesse Bartola
Jesse Bartola
10,438 Points

Unable to install Mongo-Hacker

I am using Mac OS X Yosemite with MongoDB v3.0.7 and npm 3.4.1; When I try to install mongo-hacker npm gives an error:

"Failed at the mongo-hacker@0.0.11 install script 'make install'."

Is there a way to resolve this?

Run

brew update && brew upgrade

This is from TylerBrock's suggestions here: https://github.com/TylerBrock/mongo-hacker/issues/88

My results: https://www.dropbox.com/s/n34zan443iqrvg4/brewski2.jpg?dl=0

You can also make sure you're running the most current version of npm:

sudo npm install npm -g
Jesse Bartola
Jesse Bartola
10,438 Points

Thank you! Updating/upgrading homebrew fixed the problem.

8 Answers

Run

brew update && brew upgrade

This is from TylerBrock's suggestions here: https://github.com/TylerBrock/mongo-hacker/issues/88

My results: https://www.dropbox.com/s/n34zan443iqrvg4/brewski2.jpg?dl=0

You can also make sure you're running the most current version of npm:

sudo npm install npm -g

For the next students who come along, if you don't have npm installed (as was my case) here's what to do: download this: https://nodejs.org/en/

(You need this install in order to install mongo-hacker)

Source: http://blog.npmjs.org/post/85484771375/how-to-install-npm

Sherrie,

your comment on the issue seems to be the best answer. If you could make the comment into an answer, we can mark it as best answer for future students. Thanks!

Nicolas

Will Sears
Will Sears
5,658 Points

Same problem for me, managed to get it working with this:

git clone --depth=1 https://github.com/TylerBrock/mongo-hacker.git
cd mongo-hacker
make install
Max Bulygin
Max Bulygin
5,601 Points

Thanks for this solution, it helped!

I have same problem. npm: 3.5.2 node: 4.2.3

Dude, I have fix my problem.

down vote accepted As per photusenigma at: https://github.com/npm/npm/issues/4815

Run these commands in a terminal window (note - DON'T replace the $USER part...thats a linux command to get your user!):

sudo chown -R $USER ~/.npm sudo chown -R $USER /usr/local/lib/node_modules

brew update && brew upgrade

sudo npm install npm -g

Now you should be able to install BUT make sure you DON'T use sudo. npm install -g mongo-hacker

Colin Marshall
Colin Marshall
32,861 Points

Agreed. You will run into countless problems using npm if you don't fix your permissions. Here's an article on how to fix them: Fixing npm permissons.

try with/without sudo.

Jesse Bartola
Jesse Bartola
10,438 Points

Installation failed regardless of privileges

Jesse Bartola
Jesse Bartola
10,438 Points

I used homebrew. Here's the full error:

Failed at the mongo-hacker@0.0.11 install script 'make install'. Make sure you have the latest version of node.js and npm installed. If you do, this is most likely a problem with the mongo-hacker package, not with npm itself. Tell the author that this fails on your system: make install You can get their info via: npm owner ls mongo-hacker There is likely additional logging output above.

Colin Marshall
Colin Marshall
32,861 Points

What versions of Node and NPM are you running?

Vitaly Kashubin
Vitaly Kashubin
8,449 Points

'cat' is not recognized as an internal or external command, operable program or batch file.