3

I'm trying to make jQuery correctly compiled by Google closure with the rest of my script.

Here the command line I am using with compiler :

java -jar /my/path/to/compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --generate_exports  --js /srv/www/path/source/d8e44b35ea72f2e71350f2e87f7c6ab2.js --js_output_file /srv/www/path/d8e44b35ea72f2e71350f2e87f7c6ab2.js --externs /My/path/to/jquery.js --process_jquery_primitives

The message given by the compiler in return not seems very clear to me :

com.google.javascript.jscomp.CompilerOptionsPreprocessor$InvalidOptionsException: The jQuery pass and the Closure pass cannot both be enabled.
    at com.google.javascript.jscomp.CompilerOptionsPreprocessor.preprocess(CompilerOptionsPreprocessor.java:80)
    at com.google.javascript.jscomp.Compiler.compileInternal(Compiler.java:744)
    at com.google.javascript.jscomp.Compiler.access$000(Compiler.java:94)
    at com.google.javascript.jscomp.Compiler$3.call(Compiler.java:657)
    at com.google.javascript.jscomp.Compiler$3.call(Compiler.java:654)
    at com.google.javascript.jscomp.Compiler$4.call(Compiler.java:701)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

I did not find any help out there for this issue. Anyone can help ?

DoubleMiP
  • 71
  • 4
  • 1
    possible duplicate of [How to make Jquery work with google closure compiler](http://stackoverflow.com/questions/16461915/how-to-make-jquery-work-with-google-closure-compiler) – Chad Killingsworth Aug 17 '15 at 21:00

1 Answers1

0

In my case, downgrade Closure Compiler jar fix that problem, my specific version bellow:

Closure Compiler (http://code.google.com/closure/compiler)
Version: v20131014-36-g579770a
Built on: 2013/10/31 17:14
fractefactos
  • 353
  • 4
  • 10