Exception when trying to minify Angular

Jul 3, 2013 at 1:25 AM
Just like the title says. See below for the exception and stack trace:
2013-07-03 10:21:39,228 [53] Piedone.Combinator.CombinedResourceManager - Error when combining JavaScript files
Orchard.OrchardException: Processing of resource http://localhost:30320/OrchardLocal/Modules/CV.Prototype/scripts/AngularJS.js failed. ---> EcmaScript.NET.EcmaScriptRuntimeException: identifier is a reserved word
   at Yahoo.Yui.Compressor.CustomErrorReporter.Error(String message, String sourceName, Int32 line, String lineSource, Int32 lineOffset)
   at EcmaScript.NET.Parser.AddError(String messageId)
   at EcmaScript.NET.Parser.ReportError(String messageId)
   at EcmaScript.NET.Parser.primaryExpr()
   at EcmaScript.NET.Parser.memberExpr(Boolean allowCallSyntax)
   at EcmaScript.NET.Parser.unaryExpr()
   at EcmaScript.NET.Parser.mulExpr()
   at EcmaScript.NET.Parser.addExpr()
   at EcmaScript.NET.Parser.shiftExpr()
   at EcmaScript.NET.Parser.relExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.eqExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.bitAndExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.bitXorExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.bitOrExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.andExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.orExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.condExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.assignExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.variables(Boolean inForInit)
   at EcmaScript.NET.Parser.statementHelper(Node statementLabel)
   at EcmaScript.NET.Parser.statement()
   at EcmaScript.NET.Parser.parseFunctionBody()
   at EcmaScript.NET.Parser.function(Int32 functionType)
   at EcmaScript.NET.Parser.primaryExpr()
   at EcmaScript.NET.Parser.memberExpr(Boolean allowCallSyntax)
   at EcmaScript.NET.Parser.unaryExpr()
   at EcmaScript.NET.Parser.mulExpr()
   at EcmaScript.NET.Parser.addExpr()
   at EcmaScript.NET.Parser.shiftExpr()
   at EcmaScript.NET.Parser.relExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.eqExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.bitAndExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.bitXorExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.bitOrExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.andExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.orExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.condExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.assignExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.expr(Boolean inForInit)
   at EcmaScript.NET.Parser.primaryExpr()
   at EcmaScript.NET.Parser.memberExpr(Boolean allowCallSyntax)
   at EcmaScript.NET.Parser.unaryExpr()
   at EcmaScript.NET.Parser.mulExpr()
   at EcmaScript.NET.Parser.addExpr()
   at EcmaScript.NET.Parser.shiftExpr()
   at EcmaScript.NET.Parser.relExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.eqExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.bitAndExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.bitXorExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.bitOrExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.andExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.orExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.condExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.assignExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.expr(Boolean inForInit)
   at EcmaScript.NET.Parser.statementHelper(Node statementLabel)
   at EcmaScript.NET.Parser.statement()
   at EcmaScript.NET.Parser.Parse()
   at EcmaScript.NET.Parser.Parse(StreamReader sourceReader, String sourceURI, Int32 lineno)
   at Yahoo.Yui.Compressor.JavaScriptCompressor.Parse(StreamReader stream, ErrorReporter reporter)
   at Yahoo.Yui.Compressor.JavaScriptCompressor.DoCompress(String source)
   at Yahoo.Yui.Compressor.Compressor.Compress(String source)
   at Piedone.Combinator.Services.MinificationService.MinifyJavaScript(String javaScript) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard.Web\Modules\Piedone.Combinator\Services\MinificationService.cs:line 17
   at Piedone.Combinator.Services.ResourceProcessingService.MinifyResourceContent(CombinatorResource resource) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard.Web\Modules\Piedone.Combinator\Services\ResourceProcessingService.cs:line 138
   at Piedone.Combinator.Services.ResourceProcessingService.ProcessResource(CombinatorResource resource, StringBuilder combinedContent, ICombinatorSettings settings) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard.Web\Modules\Piedone.Combinator\Services\ResourceProcessingService.cs:line 42
   at Piedone.Combinator.Services.CombinatorService.Combine(IList`1 resources, Int32 hashCode, ResourceType resourceType, ICombinatorSettings settings) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard.Web\Modules\Piedone.Combinator\Services\CombinatorService.cs:line 222
   --- End of inner exception stack trace ---
   at Piedone.Combinator.Services.CombinatorService.Combine(IList`1 resources, Int32 hashCode, ResourceType resourceType, ICombinatorSettings settings) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard.Web\Modules\Piedone.Combinator\Services\CombinatorService.cs:line 236
   at Piedone.Combinator.Services.CombinatorService.<>c__DisplayClass9.<>c__DisplayClassd.<CombineScripts>b__7(AcquireContext`1 ctx) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard.Web\Modules\Piedone.Combinator\Services\CombinatorService.cs:line 100
   at Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard\Caching\Cache.cs:line 57
   at Orchard.Caching.Cache`2.AddEntry(TKey k, Func`2 acquire) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard\Caching\Cache.cs:line 27
   at Orchard.Caching.Cache`2.<>c__DisplayClass2.<Get>b__0(TKey k) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard\Caching\Cache.cs:line 19
   at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory)
   at Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard\Caching\Cache.cs:line 17
   at Orchard.Caching.DefaultCacheManager.Get[TKey,TResult](TKey key, Func`2 acquire) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard\Caching\DefaultCacheManager.cs:line 33
   at Piedone.HelpfulLibraries.Tasks.LockingCacheManager.<>c__DisplayClass2`1.<Get>b__0(AcquireContext`1 ctx) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard.Web\Modules\Piedone.HelpfulLibraries\Libraries\Tasks\LockingCacheManager.cs:line 33
   at Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard\Caching\Cache.cs:line 57
   at Orchard.Caching.Cache`2.AddEntry(TKey k, Func`2 acquire) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard\Caching\Cache.cs:line 27
   at Orchard.Caching.Cache`2.<>c__DisplayClass2.<Get>b__0(TKey k) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard\Caching\Cache.cs:line 19
   at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory)
   at Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard\Caching\Cache.cs:line 17
   at Orchard.Caching.DefaultCacheManager.Get[TKey,TResult](TKey key, Func`2 acquire) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard\Caching\DefaultCacheManager.cs:line 33
   at Piedone.HelpfulLibraries.Tasks.LockingCacheManager.Get[TResult](String key, Func`2 acquire, Func`1 fallback, Int32 millisecondsTimeout) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard.Web\Modules\Piedone.HelpfulLibraries\Libraries\Tasks\LockingCacheManager.cs:line 28
   at Piedone.Combinator.Services.CombinatorService.<>c__DisplayClass9.<CombineScripts>b__6(ResourceLocation location) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard.Web\Modules\Piedone.Combinator\Services\CombinatorService.cs:line 92
   at Piedone.Combinator.Services.CombinatorService.CombineScripts(IList`1 resources, ICombinatorSettings settings) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard.Web\Modules\Piedone.Combinator\Services\CombinatorService.cs:line 116
   at Piedone.Combinator.CombinedResourceManager.BuildRequiredResources(String stringResourceType) in c:\TFSRoot\CatalogueOrchardPrototype\src\Orchard.Web\Modules\Piedone.Combinator\CombinedResourceManager.cs:line 125
2013-07-03 10:21:39,296 [53] Piedone.Combinator.CombinedResourceManager - Error when combining JavaScript files
Orchard.OrchardException: Processing of resource http://localhost:30320/OrchardLocal/Modules/CV.Prototype/scripts/AngularJS.js failed. ---> EcmaScript.NET.EcmaScriptRuntimeException: identifier is a reserved word
   at Yahoo.Yui.Compressor.CustomErrorReporter.Error(String message, String sourceName, Int32 line, String lineSource, Int32 lineOffset)
   at EcmaScript.NET.Parser.AddError(String messageId)
   at EcmaScript.NET.Parser.ReportError(String messageId)
   at EcmaScript.NET.Parser.primaryExpr()
   at EcmaScript.NET.Parser.memberExpr(Boolean allowCallSyntax)
   at EcmaScript.NET.Parser.unaryExpr()
   at EcmaScript.NET.Parser.mulExpr()
   at EcmaScript.NET.Parser.addExpr()
   at EcmaScript.NET.Parser.shiftExpr()
   at EcmaScript.NET.Parser.relExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.eqExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.bitAndExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.bitXorExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.bitOrExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.andExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.orExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.condExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.assignExpr(Boolean inForInit)
   at EcmaScript.NET.Parser.variables(Boolean inForInit)
   at EcmaScript.NET.Parser.statementHelper(Node statementLabel)
   at EcmaScript.NET.Parser.statement()
   at EcmaScript.NET.Parser.parseFunctionBody()
   at EcmaScript.NET.Parser.function(Int32 functionType)
Jul 3, 2013 at 5:27 PM
Have you tried this with the latest source?
Jul 17, 2013 at 8:56 PM
Also see "A Note on Minification" here: http://docs.angularjs.org/tutorial/step_05