I am working in windows platform, and want to use some Unix shell command in daily work.So I install the shelljs package via node as following:
npm install -g shelljs
the installation runs well. But I can't use the shx as interface to run Unix shell. The error message said "it is not recognized as an internal or external command".
So how to fix the issue?
Edit:
Find the reason, it turns out there is another node package named shx
. The difference between shelljs
and shx
is:
- ShellJS: Good for writing long scripts, all in JS, running via NodeJS (e.g. node myScript.js).
- shx: Good for writing one-off commands in npm package scripts (e.g. "clean": "shx rm -rf out/").
so install shx is the correct move I need to make.