Magento 2 Errors and Solutions

“Cannot create a symlink for ” error

This error most likely will show up when you are running Magento 2 on Windows system (XAMPP, WAMP, etc).  This error causes font icons to be replaced by non-resolvable symbols (problem in the admin area).  Long story short, if Magento can’t find a static asset file, it will automatically copy or symlink that file from that file’s source module.  In our case symlink does not work on Windows system. In order to solve this problem:

  1. Open up app/etc/di.xml and find the virtualType name="developerMaterialization" section. In that section you’ll find an item name="view_preprocessed" that needs to be modified or deleted. You can modify it by changing the contents from Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink to Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
  2. Delete the files under pub/static to get rid of any existing symlinks. You may want to be careful not to delete the .htaccess file.