Magento – Cannot create symlink in magento

gruntmagento2

I installed grunt and run command grunt exec:my theme but it shows me

[Magento\Framework\Exception\FileSystemException]
Cannot create a symlink for "C:/xampp/htdocs/packt/vendor/magento/theme-frontend-blank/web/css/source/_reset.l
ess" and place it to "C:/xampp/htdocs/packt/pub/static/frontend/gog/gogparent/en_US/css/source/_reset.less" Wa
rning!symlink(): Cannot create symlink, error code(1314)

( gog is my custom theme )
I checked di.xml in app/etc folder and in virtualTypename="developerMaterialization" section ,content is

Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

then I clean cache and Delete the files under pub/static,but error still showing when I run command.what can I do with this problem?

Best Answer

Please open the cmd window as administrator. Right click on CMD then "Run as Administrator" then run your grunt commands and it will work !

Related Topic