It's now been a few times I am getting this error. Using Sitecore 8.2 rev. 160729 along with SXA 1.2 rev. 161216, when I modify a SXA javascript file (ie. a component-* file) inside the Media Library > Wireframe > Themes > Scripts, everything works fine but after a while I get in JS console:
"Uncaught SyntaxError: Unexpected token >"
Inside the optimized javascript file that yields this error there indeed is a "<" missing at the first link tag after the jQuery code
This error is always yielded by a missing "<" at the end of the file I modified no matter what I modified, even if I put back the original version or just change an unsignificant character inside a string
As you can see, the portion of code that has the error corresponds to the source which does not miss the "<",
There is noI get this error inside thein sitecore logs. in the middle of Indexes rebuild jobs,
10116 15:10:27 ERROR Application error.
Exception: System.NullReferenceException
Message: La référence d'objet n'est pas définie à une instance d'un objet.
Source: AjaxMin
à Microsoft.Ajax.Utilities.JSParser.ParseUnaryExpression(Boolean& isLeftHandSideExpr, Boolean isMinus)
à Microsoft.Ajax.Utilities.JSParser.ParseExpressionStatement(Boolean fSourceElement)
à Microsoft.Ajax.Utilities.JSParser.ParseStatement(Boolean fSourceElement, Boolean skipImportantComment)
à Microsoft.Ajax.Utilities.JSParser.ParseStatements(Block block)
à Microsoft.Ajax.Utilities.JSParser.InternalParse()
à Microsoft.Ajax.Utilities.Minifier.MinifyJavaScript(String source, CodeSettings codeSettings)
à Sitecore.XA.Foundation.Theming.Bundler.AssetBundler.MinifyContent(MemoryStream memoryStream, StreamWriter writer, OptimizationType type)
à Sitecore.XA.Foundation.Theming.Bundler.AssetBundler.PrepareContent(List`1 items, OptimizationType type, Boolean minify, StreamWriter writer, MemoryStream memoryStream)
à Sitecore.XA.Foundation.Theming.Bundler.AssetBundler.CreateOptimizedItemForDirectory(Item directory, OptimizationType type, Boolean minify)
à Sitecore.XA.Foundation.Theming.Pipelines.MediaRequestHandler.OptimizedFiles.ReGenerateOptimizedItem(String path, MediaRequest request)
à Sitecore.XA.Foundation.Theming.Pipelines.MediaRequestHandler.OptimizedFiles.Process(MediaRequestHandlerArgs handlerArgs)
à (Object , Object[] )
à Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
à Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, Boolean failIfNotExists)
à Sitecore.XA.Foundation.MediaRequestHandler.MediaRequestHandler.DoProcessRequest(HttpContext context)
à Sitecore.Resources.Media.MediaRequestHandler.ProcessRequest(HttpContext context)
à System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
à System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
After a few times waiting, the error sometimes goes away but I would like to have a way to fix it rightaway without losing time.