I reckon there's several types of errors that can be triggered by the deployment.
First you can see that Exception are handled directly in the execution in Magento/Deploy/Console/Command/DeployStaticContentCommand.php
:
catch (\Exception $e) {
$output->writeln('<error>' . $e->getMessage() . '</error>>');
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
$output->writeln($e->getTraceAsString());
}
return;
}
Regarding the errors that are counted it's a totally different system, you need to look into the Magento/Deploy/Model/Deployer
class, the output you got is written by the deploy()
method:
$this->output->writeln("\nSuccessful: {$this->count} files; errors: {$this->errorCount}\n---\n");
Now if we check when this errorCount
variable is incremented, we find the following in the deployFile()
method:
catch (\Exception $exception) {
$this->output->write('.');
$this->verboseLog($exception->getTraceAsString());
$this->errorCount++;
}
And as you may have already guessed, the verboseLog()
method only outputs when the command is run on verbose mode:
private function verboseLog($message)
{
if ($this->output->isVerbose()) {
$this->output->writeln($message);
}
}
So I reckon you need to run your command like this to see the errors:
php bin/magento setup:static-content:deploy -v
If it doesn't work try the extra verboses:
php bin/magento setup:static-content:deploy -vv
php bin/magento setup:static-content:deploy -vvv
You can use client-side compilation:
In the Magento Admin, change the LESS compilation mode to client-side under STORES > Configuration > ADVANCED > Developer > Front-end development workflow > Workflow type. For detailed description see the CSS preprocessing topic.
Delete all files in the following directories:
pub/static/frontend//
var/view_preprocessed/less
Instructions taken from the Dev Docs - http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-guide/css_quick_guide_mode.html
Although I recommend using your own Gulp/Grunt setup over the build-in ones but that's a larger task than one admin setting.
Best Answer
If you use production mode you need redeploy static content with command:
bin/magento setup:static-content:deploy