I have been using shelljs for a project of mine and found this little problem.
let shell = require('shelljs')
shell.exec('js')
When I execute this script, it does not open de javascript command line, instead it's like the terminal is waiting for something like a carry return or something.
As far as I know, shelljs is the portable implementation of Unix shell commands on top of the Node.js API.
Maybe you could run your commands or scripts by means of the 'vm' package.