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:
- Open up
app/etc/di.xmland find thevirtualType name="developerMaterialization"section. In that section you’ll find an itemname="view_preprocessed"that needs to be modified or deleted. You can modify it by changing the contents fromMagento\Framework\App\View\Asset\MaterializationStrategy\SymlinktoMagento\Framework\App\View\Asset\MaterializationStrategy\Copy - Delete the files under pub/static to get rid of any existing symlinks. You may want to be careful not to delete the
.htaccessfile.