Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the command clean-css after its installation?

Tags:

css

node.js

I downloaded nodes.js v0.10.15-linux-x86 and add it to path so that it is only usable by me. I installed [email protected]. However, after the installation, I cannot find it anywhere.

npm http GET https://registry.npmjs.org/clean-css
npm http 200 https://registry.npmjs.org/clean-css
npm http GET https://registry.npmjs.org/clean-css/-/clean-css-1.1.3.tgz
npm http 200 https://registry.npmjs.org/clean-css/-/clean-css-1.1.3.tgz
npm http GET https://registry.npmjs.org/commander
npm http 200 https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/commander/-/commander-2.0.0.tgz
npm http 200 https://registry.npmjs.org/commander/-/commander-2.0.0.tgz
[email protected] node_modules/clean-css
└── [email protected]

I looked at node/lib/node_modules/ directory, there is no such directory named as "clean-css".

Can you see what's wrong with the setup?

Thanks

like image 818
chfw Avatar asked Oct 14 '13 09:10

chfw


2 Answers

By default, npm will only install the module in a local node_modules folder. The idea is that each module, project you run can have isolated versions of its dependencies.

Try npm install -g clean-css (install globally) if you want to run it from the shell.

like image 125
Laurent Perrin Avatar answered Nov 08 '22 07:11

Laurent Perrin


according to clean-css github page(https://github.com/jakubpawlowicz/clean-css-cli), they split the versions into clean-css and clean-css-cli. so the command line version can be installed via "npm install clean-css-cli -g" and then it can be accessed from shell as "cleancss" again.

like image 27
nurp Avatar answered Nov 08 '22 07:11

nurp