我正在使用带有标志 child_process 的 ES6 测试节点,--harmony
但在我导入时它在第一步失败。有任何想法吗?
import {'spawn'} from child_process;
console.log(spawn);
我跑:
node --harmony test.js
我得到:
:1
(function (exports, require, module, __filename, __dirname) { import {spawn} f
^^^^^^
SyntaxError: Unexpected token import