Problem with jsmin

Hello We use the code $this->_assetsCollection ->addFilter(new \Phalcon\Assets\Filters\Jsmin()) ->join(true) ->setTargetPath($filePath);

$assetsManager->set('CompilationJSAssets', $this->_assetsCollection);

And when we call $assetsManager->outputJs('CompilationJSAssets'); 502 error occurs

This error occurs only when we use new \Phalcon\Assets\Filters\Jsmin()

Probable something wasn't inslalled on the server side. Help us please.

Check logs maybe? But it looks like seg fault.


In php log I see nothing and in nginx log I see just 502 error.

edited Jul '17

Have you enabled verbose logging for both php and nginx?

ini_set('display_errors', 'On');

I had this happen to me and the issue was some of the syntax in my JS. Have you tried to divide and conquer your JS to see if some part of it is throwing an error.

Well above can be good point. Like missing ; in js code can cause a problem with minimizing it though it's kind of stupid, it should minimize anyway, just script should not work properly.