General Discussion Creating Your Own Arbitrary Tasks

jlampstack
jlampstack
17,749 Points

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,601 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