I installed npm 2.15.9, works fine anywhere when I open the Command Prompt.
I (allegedly) installed uglifyjs by typing
npm install -g uglifyjs
I tried with and without -g, and I ran it in the folder where I want to use it. Even after doing so and not receiving any error, typing "uglifyjs" or "node uglifyjs" in the CMD terminal return the standard error message - uglifyjs is not recognized as an internal or external command, operable program or batch file."
What am I doing wrong?
EDIT: yes, I tried closing and reopening the CMD window at each step.
uglifyjs is deprecated - use uglify-js instead.
npm install -g uglify-js
npm ls -g | findstr uglify
should reveal it).npm config get prefix
and, with that path:
%PATH%
(echo %PATH%
)?npm
is actually installing the binaries in that folder (dir C:\Users\emanuelec\AppData\Roaming\npm
).It does seem to that 'bin links' are being generated (from your comment above, C:\Users\emanuelec\AppData\Roaming\npm\uglifyjs
), so I suspect the npm\
folder is not in your path, or is being clobbered by something.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With