After creating my theme I'm trying to compile less files. but I'm having errors when : grunt exec:exercise1. I'm using a windows machine.enter image description here

  • Have you tried just running grunt:exec first? – Nathan Toombs Jan 12 '16 at 23:26
  • yes. i installed node.js, run the npm install commands and then run the exec command. even if i run the exec command with the luma theme i have the same errors – Fedi Jan 13 '16 at 16:31
  • I reinstall magento without creating a new theme. and even when i run the exec on the luma theme i got the same errors.and it deletes all the files on pub/static – Fedi Jan 13 '16 at 16:41

I have tried so many things to solve this on windows xampp but finally it's working with simple thing: Run CMD command prompt with administrator privilege to run your commands.


The luma theme depends on the blank theme to have all of it's assets compiled and linked to in the pub directory, otherwise it will have missing less variables, mixins, etc, that it expects to find from the blank theme. The same is true for any theme that uses the luma theme as a dependency. If you you try to run grunt exec:luma before grunt exec:blank you will get errors. To fix this, the first time you are compiling your less files in a theme that depends on another theme, you should run grunt exec without any themes in the command and grunt will compile each theme in order. To make sure grunt knows you are using blank or luma as a dependency, you should make sure your theme.xml file included in your theme has the parent node where the value is the theme your theme inherits from.

Read through this guide thoroughly and you shouldn't encounter any problems. http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css_debug.html

  • I tried to run only grunt exec after cleaning and got the same errors; [Magento\Framework\Exception\FileSystemException] >> Cannot create a symlink for "/vagrant/data/magento2/app/design/frontend/Magento/blank/web/css/source/_reset.less" and place it to "/vagrant/data/magento2/pub/static/frontend/Magento/blank/en_US/css/source/_reset.less" Warning!file_get_contents(/vagrant/data/magento2/var/cache//mage-tags/mage---e92_INTERCEPTION): failed to open stream: No such file or directory – Fedi Jan 13 '16 at 18:18

Grunt will not help you much. I got symlink error when use grunt.
I only use this commands setup:static-content:deploy . Make sure you get all required less file to your theme before run above command
Example theme luma. Files missing that i added to my custom theme

    new file:   app/design/frontend/Magento/market/web/css/source/_actions-toolbar.less
    new file:   app/design/frontend/Magento/market/web/css/source/_breadcrumbs.less
    new file:   app/design/frontend/Magento/market/web/css/source/_buttons.less
    new file:   app/design/frontend/Magento/market/web/css/source/_dropdowns.less
    new file:   app/design/frontend/Magento/market/web/css/source/_email-base.less
    new file:   app/design/frontend/Magento/market/web/css/source/_email-extend.less
    new file:   app/design/frontend/Magento/market/web/css/source/_email-variables.less
    new file:   app/design/frontend/Magento/market/web/css/source/_forms.less
    new file:   app/design/frontend/Magento/market/web/css/source/_icons.less
    new file:   app/design/frontend/Magento/market/web/css/source/_loaders.less
    new file:   app/design/frontend/Magento/market/web/css/source/_messages.less
    new file:   app/design/frontend/Magento/market/web/css/source/_pages.less
    new file:   app/design/frontend/Magento/market/web/css/source/_popups.less
    new file:   app/design/frontend/Magento/market/web/css/source/_price.less
    new file:   app/design/frontend/Magento/market/web/css/source/_rating.less
    new file:   app/design/frontend/Magento/market/web/css/source/_sections.less
    new file:   app/design/frontend/Magento/market/web/css/source/_tooltips.less
    new file:   app/design/frontend/Magento/market/web/css/source/_typography.less
    new file:   app/design/frontend/Magento/market/web/css/source/components/_modals.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_actions-toolbar.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_breadcrumbs.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_buttons.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_dropdowns.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_forms.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_grids.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_icons.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_layout.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_loaders.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_messages.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_navigation.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_pages.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_popups.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_rating.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_sections.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_tables.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_tooltips.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_typography.less
    new file:   app/design/frontend/Magento/market/web/css/source/lib/_utilities.less

i resolve the issue for windows users (windows 7) when trying to run grunt. if you got symlinks errors when trying to do : grunt exec ln -fs out/Release/node node more details here : http://www.ahtik.com/blog/fixing-your-virtualbox-shared-folder-symlink-error/


I had this error on my local with Windows 10, wamp, and running commands via Babun. I closed out my terminal and started a session as an administrator, and now Im able to process the commands without errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.