thanpolas / grunt-closure-tools

Google Closure Tools for grunt
MIT License
95 stars 22 forks source link

Having trouble compiling #41

Closed aholla closed 10 years ago

aholla commented 10 years ago

Everything was working correctly untill I updated my java version. Now I get the following error:

>> Error: Command failed: ../closure/closure-library/bin/build/closurebuilder.py: Scanning paths...
>> ../closure/closure-library/bin/build/closurebuilder.py: 71 sources scanned.
>> ../closure/closure-library/bin/build/closurebuilder.py: Building dependency tree..
>> Traceback (most recent call last):
>>   File "../closure/closure-library/bin/build/closurebuilder.py", line 256, in <module>
>>     main()
>>   File "../closure/closure-library/bin/build/closurebuilder.py", line 241, in main
>>     options.compiler_flags)
>>   File "D:\_WORK\JOB_NAME\development\build\closure\closure-library\bin\build\jscompiler.py", line 50, in Compile
>>     if not (distutils.version.LooseVersion(_GetJavaVersion()) >=
>>   File "D:\_WORK\JOB_NAME\development\build\closure\closure-library\bin\build\jscompiler.py", line 34, in _GetJavaVersion
>>     return _VERSION_REGEX.search(version_line).group(1)
>> AttributeError: 'NoneType' object has no attribute 'group'
>> FAILED to run command for target: simple
Warning: Task "closureBuilder:simple" failed. Use --force to continue.

Aborted due to warnings.

The depswriter still works and if I manually run the compiler it works but not viar the "compiler tools" and grunt.

Thanks.

thanpolas commented 10 years ago

What version of Java do you have?

here's mine:

[16:11:21] $ java -version
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)
aholla commented 10 years ago

Hi, I fixed the issue, the new version of java was being called although it was not set as my JAVA-HOME. removing it fixed the problem.