compile less files with grunt don t work!errors with EXEC command
-
08-12-2020 - |
Solution 4
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/
OTHER TIPS
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
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 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.