uglify js错误意外令牌eof"undefined"

Eva*_*van 7 javascript concat minify npm uglifyjs

所以我使用npm install uglify-js安装了npm

我运行的命令是:

cat file1.js file2.js .. fileN.js | uglifyjs -o files.min.js
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

WARN: ERROR: Unexpected token eof «undefined», expected punc «,» [-:630,15]

/usr/local/lib/node_modules/uglify-js/lib/parse.js:199
    throw new JS_Parse_Error(message, line, col, pos);
          ^
Error
    at new JS_Parse_Error (/usr/local/lib/node_modules/uglify-js/lib/parse.js:185:18)
    at js_error (/usr/local/lib/node_modules/uglify-js/lib/parse.js:199:11)
    at croak (/usr/local/lib/node_modules/uglify-js/lib/parse.js:630:9)
    at token_error (/usr/local/lib/node_modules/uglify-js/lib/parse.js:638:9)
    at expect_token (/usr/local/lib/node_modules/uglify-js/lib/parse.js:651:9)
    at expect (/usr/local/lib/node_modules/uglify-js/lib/parse.js:654:36)
    at ctor.argnames (/usr/local/lib/node_modules/uglify-js/lib/parse.js:897:52)
    at function_ (/usr/local/lib/node_modules/uglify-js/lib/parse.js:902:15)
    at expr_atom (/usr/local/lib/node_modules/uglify-js/lib/parse.js:1114:24)
    at maybe_unary (/usr/local/lib/node_modules/uglify-js/lib/parse.js:1278:19)
Run Code Online (Sandbox Code Playgroud)

关于这是关于什么或我应该如何修复它的任何想法?

Cᴏʀ*_*ᴏʀʏ 7

错误:意外的令牌eof«undefined»,预期punc«,»[ - :630,15]

我相信所有这一切都意味着你,在JS代码中遗漏了某个地方,可能在第630行,在第15个字符附近.

因此,如果您连接所有JS文件的源代码并查看第630行,您可能会发现解析器认为缺少逗号的位置.