4

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

13
  1. Remove Cache
  2. Clean theme by the command: grunt clean
  3. Run CMD command prompt with administrator privilege.
  4. Run the command: grunt exec:yourthemename
  5. Run the command: grunt less:yourthemename
  6. 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

  • I don't think running grunt exec / less etc. as admin is a good idea. And I think it is a Magento 2 bug. See my answer. Or did it work for you? Actually I am using the latest beta, not the develop branch. – Alex Oct 3 '15 at 21:43
  • How it is working from admin ? I am working on magento master branch code. – Suresh Chikani Oct 4 '15 at 6:12
  • Had the same error when running grunt exec: mytheme (win7 xampp). Running CMD as admin sorted the issue :). – Vvvaida Apr 16 '16 at 19:52
  • Disclaimer: Basically working - but there is still one issue in Magento 2 – Alex Sep 8 '16 at 19:28
1

It looks like this is a known bug:

https://github.com/magento/magento2/issues/1619

The is a patch at

https://gist.githubusercontent.com/godban/8cb178f9a84ed85f1eac/raw/08692fc973adb4d5fa1eb8e57702c4a7d236658a/deployer_and_import_fix.patch

  • Are you running cmd command prompt run with administrator privilege ? i am use windows system and i had face this issue in windows. cmd command prompt run with administrator privilege, i am success. try it and tell me next error. – Suresh Chikani Oct 3 '15 at 18:26
  • Nope, but my permissions should be right, and I work on Ubuntu. – Alex Aug 22 '16 at 13:40
0

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.

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.