I have installed the magento 2.2.1 but on deploying static content it is giving following error
PHP Fatal error: Uncaught Error: Call to a member function getPackage() on null in /var/www/html/unicorn-magento/vendor/magento/module-deploy/Package/Processor/PostProcessor/CssUrls.php:215
Stack trace:
#0 /var/www/html/unicorn-magento/vendor/magento/module-deploy/Package/Processor/PostProcessor/CssUrls.php(109): Magento\Deploy\Package\Processor\PostProcessor\CssUrls->getValidExternalUrl('{{base_url_path...', Object(Magento\Deploy\Package\Package))
#1 /var/www/html/unicorn-magento/vendor/magento/module-deploy/Package/Processor/PostProcessor/CssUrls.php(80): Magento\Deploy\Package\Processor\PostProcessor\CssUrls->parseCss(Array, 'css/email-inlin...', 'frontend/Custom...', '@import url("{{...', Object(Magento\Deploy\Package\Package))
#2 /var/www/html/unicorn-magento/vendor/magento/module-deploy/Service/DeployPackage.php(147): Magento\Deploy\Package\Processor\PostProcessor\CssUrls->process(Object(Magento\Deploy\Package\Package), Array)
#3 /var/www/html/unicorn-magento/vendor/magento/module-deploy/Service/DeployPackage.php(103): in /var/www/html/unicorn-magento/vendor/magento/module-deploy/Package/Processor/PostProcessor/CssUrls.php on line 215
I have removed view_processed content, pub/satatic and tried multiple times but this error is showing. Please help to resolve this. Thanks