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

General Discussion Creating Your Own Arbitrary Tasks

Should uglify also be in the hidden .bin directory?

I am working locally in vscode and mocha is showing up in the .bin directory, but i don't see anything for uglify and i believe for that reason i keep getting an error message as shown below.

bash: node_modules/.bin/uglifyjs: No such file or directory

How can I fix this?

LESSON: https://teamtreehouse.com/library/creating-your-own-arbitrary-tasks

1 Answer

Bader Alsabah
Bader Alsabah
4,738 Points

I believe you just need to run the install npm command to have uglifyjs. Make sure in the package.json file the following development dependencies are shown

 "devDependencies": {
    "mocha": "^2.2.5",
    "uglify-js": "^2.4.23"
  }

If the above dependencies are in your package.json file, then all you need to do is type the following command and that will install both mocha and uglify into the node modules bin.

npm install