armin-pfaeffle / atom-minify

Minifies JS and CSS files, optionally on save ‒ package for atom.io
https://atom.io/packages/atom-minify
MIT License
24 stars 7 forks source link

Unable to minify JavaScript files due to parameter error #64

Open Joeri-G opened 5 years ago

Joeri-G commented 5 years ago

When I attempt to minify a JavaScript file I get an error that is produced by an invalid parameter when passing my script on to the Java minify script. Error Log:

[Error:]) Command failed: java -jar -Xss2048k "/home/joeri/.atom/packages/atom-minify/lib/minifier/js/../_bin/yuicompressor-2.4.7.jar"  --type js -o "/tmp/atom-minify.output.70562788-972a-464b-9ee7-2bc97cfa331e.js" "/tmp/atom-minify.input.41380952-d7cc-45bf-9ea0-2562f8e5da5c.tmp"

[ERROR] 24:47:missing ) after formal parameters

[ERROR] 1:0:Compilation produced 1 syntax errors.

org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors.
    at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICompressor.java:154)
    at org.mozilla.javascript.Parser.parse(Parser.java:392)
    at org.mozilla.javascript.Parser.parse(Parser.java:337)
    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312)
    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
    at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:131)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21)
darmentrout commented 5 years ago

I'm getting the same kind of error.

Minify: Minification error
A Error: Command failed: java -jar · Xss2048k '"C:\Users\username\.atom\packages\atom-minify\lib\minifier\js/ . ./ _bin/yuicompressor· 2.4. 7 .Jar· · -ty~ JS -o ·c:\Users\username\Documents\wp-content\themes\gotravel-child\custom~s\tnpplanner.minJs'" '"C:\Users\username\Documents\wpconte
nt\themes\9otravel-ch1ld\custom'ys\tnpplanner JS" [ERROR] 2410:16:m1ss1n9 vanable name [ERROR] 2412:40:1denllfier 1s a re..,rved word [ERROR] 2413:38:idenllfier is a reserved word [ERROR] 2611:29:missin9 variable name [ERROR] 2612:67:ident11ier is a reserved word [ERROR] 3482:31:miss1n9 formal parameter
[ERROR] l:O:Compilat1on produced 6 syntax errors. org.moz1lla.Javascript.EvaluatorException: Compilation produced 6 syntax errors. at com.yahoo.platform.yu1.compressor.YUK:ompressor$1.runtimeError(YUICompressorJava:154) at org.moz1lla1avascnpt.Parser.parse(Parser.java:392) at
org.mozilla.javascript.Parser.parse(Parser.,ava:33 7) at com.yahoo.platform.yu i.compressor JavaScriptCompressor.parse(JavaScnptCom pressor .,.ava:312) at com.yahoo.platform.yu i.compressor JavaScriptCompressor. <in it> (JavaScnptC ompressor .Java:533) at
com.yahoo.platform.yui.compressor.YUICompressor.ma1n(YUICompressor.java:131) at sun.reflectNativeMethodAccessorlmpl.1nvokeO(Nahve Method) at sun.refl~t.NativeMethodAccessorlmpl.invoke(Unknown Source) at sun.reflect.Delegat1n9MethodAccessorlmpl.invoke(Unlcnown Source) at
java.lang.reflectMethod.1nvoke(Unknown Source) at c om.yahoo.platform.yui.compressor.Bootstrap.main{Bootstrap.Java:21)
amerikans commented 4 years ago

same also looking for solution