Tag: 回声

在PowerShell中,使用echo命令编写的文件不能与NodeJS一起使用

echo "console.log('Test success!')" > app.js node app 在Linux上运行良好。 PowerShell,但是,会产生以下错误消息: ~\apps\test\app.js:1 (function (exports, require, module, __filename, __dirname) { c ^ SyntaxError: Invalid or unexpected token at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:528:28) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.runMain (module.js:590:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3 另一方面,如果我要echo > […]