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.

JavaScript

We're setting up a new system to run our tests. Issue the command to install Mocha globally?

my answer is not passing: Command Prompt: $ npm install --global mocha

2 Answers

Steven Parker
Steven Parker
216,083 Points

The challenge only wants the command that you would enter, so don't include the "Command Prompt: $ " part.

Ari Misha
Ari Misha
19,274 Points

hiya Aaron! Is it a challenge question or you tried to install mocha on your local machine and it failed? If you're running it on your local machine try running via Bower, like this

$ bower install mocha

Make sure of version of mocha and it dependencies. To install Mocha v3.0.0 or newer with npm, you will need npm v1.4.0 or newer. Additionally, to run Mocha, you will need Node.js v0.10 or newer. Do that and you're good to go.

But ideally "npm install --global mocha" should work. Maybe try it without the global flag. "npm install mocha". I hope it helped. (:

its npm install mocha -g