我刚刚安装了 Uglify.js 并尝试使用它来重建 CoffeeScript,但不断收到此错误。当我在 CoffeeScript 目录中键入“cake build:browser”时会发生这种情况。(我想尝试修改 CoffeeScript 语言。)
我的 Uglify.js 是从 GitHub 克隆的,符号链接是在 .node_libraries 中创建的。Uglify 安装正确,确认它在 Node 中和通过命令行正常运行。所以也许这是一个 CoffeeScript 问题。
帮助?
/Users/myuser/projects/UglifyJS/lib/process.js:475
return options.defines[name];
^
TypeError: Cannot read property 'Array' of undefined
at get_define (/Users/myuser/projects/UglifyJS/lib/process.js:475:47)
at Array.<anonymous> (/Users/myuser/projects/UglifyJS/lib/process.js:527:32)
at walk (/Users/myuser/projects/UglifyJS/lib/process.js:215:47)
at Array.<anonymous> (/Users/myuser/projects/UglifyJS/lib/process.js:164:59)
at walk (/Users/myuser/projects/UglifyJS/lib/process.js:220:36)
at Array.<anonymous> (/Users/myuser/projects/UglifyJS/lib/process.js:146:43)
at walk (/Users/myuser/projects/UglifyJS/lib/process.js:220:36)
at /Users/myuser/projects/UglifyJS/lib/process.js:1643:37
at Array._block (/Users/myuser/projects/UglifyJS/lib/process.js:81:34)
at walk (/Users/myuser/projects/UglifyJS/lib/process.js:220:36)