Magento 2 grunt exec does not actually create symlinks
-
13-12-2019 - |
Question
I am following:
http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css_debug.html#grunt_prereq
it says grunt exec:<theme>
does:
Republishes symlinks to the source files to the pub/static/frontend/Vendor/default/<locale> directory.
But that does not seem to happen!
pub/static/frontend/Vendor/default/de_DE/css/source
contains regular files where I would expect symlinks to app/design/frontend/Vendor/default
Is this a bug or am I doing something wrong?
edit I am just having this s ame problem again with Magento 2.1 - even if the patch of issue https://github.com/magento/magento2/issues/1619 should already be contained in Magento 2.1
Solution
- Remove Cache
- Clean theme by the command:
grunt clean
- Run CMD command prompt with administrator privilege.
- Run the command:
grunt exec:yourthemename
- Run the command:
grunt less:yourthemename
- Run the command:
grunt watch
Edit Alex: Basically working and the right solution, but with the limitations of https://github.com/magento/magento2/issues/6367
OTHER TIPS
It looks like this is a known bug:
https://github.com/magento/magento2/issues/1619
The is a patch at
I found how recreate symlinks: use next command: bin/magento dev:source-theme:deploy --theme="{THEME_NAME}" where {THEME_NAME} - is string, like Magento/blank
See docs here: http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-less-sass.html
Maybe you need to run grunt exec before that, I'm not sure.
But after that you can run grunt watch and it will work.