【发布时间】:2018-03-29 13:34:55
【问题描述】:
我不确定我做了什么,但我不能再编译 CoffeeScript 文件。无论我要编译哪个文件,我都会不断收到以下信息。我尝试通过运行sudo npm remove --global coffeescript 然后sudo npm install --global coffeescript 重新安装咖啡。在 Atom 中使用 coffee-compile 包的自动编译仍然有效。我该如何解决这个问题?
user@computer:~/some/path $ coffee -c code.coffee
/usr/local/lib/node_modules/coffeescript/lib/coffeescript/command.js:23
({spawn, exec} = require('child_process'));
^
ReferenceError: Invalid left-hand side in assignment
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/local/lib/node_modules/coffeescript/bin/coffee:15:5)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
【问题讨论】:
标签: node.js npm coffeescript