简体   繁体   中英

Symfony2 Assetic yuicompressor unknown error

I recently configured yuicompressor for my symfony installation. But I don't get it working. I always get this error message shown below. It doesn't matter which javascript code I try to filter. Does someone has any ideas? I don't know how/where to fix this.

  [Assetic\Exception\FilterException]                                                                                                                                                                       
  An error occurred while running:                                                                                                                                                                          
  '/usr/bin/java' '-jar' '/var/www/vhosts/domain.de/httpdocs/sf/app/Resources/java/yuicompressor-2.4.7.jar' '--charset' 'UTF-8' '-o' '/tmp/YUI-OUT-941hD3' '--type' 'js' '/tmp/YUI-IN-ll8QOg'  

  Error Output:                                                                                                                                                                                             

  [ERROR] 277:10:invalid property id                                                                                                                                                                        

  [ERROR] 277:11:syntax error                                                                                                                                                                               

  [ERROR] 278:4:syntax error                                                                                                                                                                                

  [ERROR] 1:0:Compilation produced 3 syntax errors.                                                                                                                                                         
  org.mozilla.javascript.EvaluatorException: Compilation produced 3 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:39)                                                                                                                         
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)                                                                                                                 
    at java.lang.reflect.Method.invoke(Method.java:597)                                                                                                                                                      
    at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21)                                                                                                                                   


  Input:
  ... random javascript code goes here ...

Looks like you have errors in your .js file

[ERROR] 277:10:invalid property id

[ERROR] 277:11:syntax error

[ERROR] 278:4:syntax error

Check your .js file in lines printed by yuicompressor:

Here is an example: http://www.electrictoolbox.com/yui-compressor-troubleshooting-errors/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM