index.jsnode
const shell = require('shelljs');
shell.exec('aaa', function (code, stdout, stderr) {
});
复制代码
执行 node index 出现乱码shell
先执行chcp 65001
便可ui
在当前目录执行不能加./
(powershell下执行须要加),下面这个会报错spa
shell.exec('./test', function (code, stdout, stderr) {
});
复制代码
这个报错彷佛很友好,但和乱码同时出现就很懵了。记念个人半个下午code