As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [grunt]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7 votes
2 answers
6k views

LiveReload configuration via Grunt

Edit : about the possible duplicate ! I would like to mention that this answer does not answer my question, if someone sees that it is the same thing, I invite him to answer me instead of saying that ...
PЯINCƎ's user avatar
  • 11.5k
2 votes
3 answers
2k views

Error when running grunt exec

I have followed the docs for setting up Less compilation. Running grunt clean and grunt less works without errors, but when I run grunt exec (with or without appending a specific theme name) I get the ...
rushtoni88's user avatar
0 votes
4 answers
7k views

Syntax error in Gruntfile.js?

I can't seem to be able to use Grunt to compile my less files in my custom theme. I have done all steps described in the documentation. My theme name is "alliance" so here is what I am trying to do ...
MrUpsidown's user avatar
2 votes
1 answer
2k views

Cannot create symlink in magento

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/...
mahsaabdev's user avatar
0 votes
1 answer
68 views

Log out whenever styles are changed

Whenever I change less files in my current theme I get logged out from the backend. I'm using server-side compilation I'm using grunt with livereload. I'm in developer mode. Both of them seem to ...
gabtzi's user avatar
  • 606
2 votes
1 answer
2k views

Magento2 LESS extend/override custom theme

I have been going through research and tests for whole day and still found answers do not work for my case or I just do not understand how to properly implement them - therefore post here: I have ...
Toms Bugna's user avatar
4 votes
2 answers
4k views

After upgrade to 2m2, grunt fail to run

After upgrade from v2.1.8 to v2.2.2, error is shown when i run Grunt exec $ grunt exec Loading "Gruntfile.js" tasks...ERROR Error: Cannot find file. Alias "themes" not set. Use "...
leo's user avatar
  • 1,198
1 vote
2 answers
246 views

Magento 2 - How to use grunt or gulp for speed up development?

I have heard that using grunt/gulp can speed up development by automatically cleaning the static content directories and compiling and generating new css. How can we configure these and achieve this. ...
Kapil Yadav's user avatar
1 vote
1 answer
1k views

(Magento2) Grunt Less problem with a new theme

I've cloned the blank theme for app/design/frontend/lima/mdl, swapping Magento/blank for lima/mdl and give this error: Processed Area: frontend, Locale: pt_BR, Theme: lima/mdl, File type: less. ...
Pedro Lima's user avatar
1 vote
0 answers
184 views

Jasmine Grunt Spec PhantomJS Error on Magento 2

I am having problems with PhantomJS. When I try to do a Jasmine Test. This is my first time running Jasmine. Things I did prior: Installed Grunt Executed grunt spec:backend Do check my terminal ...
Oliver Ong's user avatar
2 votes
0 answers
249 views

Grunt - is it possible to watch custome module less files?

I figured out how to watch less files changes inside my custome theme folder using Grunt, but is there any way how to watch less files in custome module? Let's assume module like so: app/code/...
tesar.hk's user avatar
0 votes
1 answer
647 views

Cannot override _forms.less

Ive tried to override the _forms.less file in my theme but its only extending the original _forms.less. My file is placed under app/design/frontend/Vendor/Theme/web/css/source/_forms.less. I am ...
Code Spirit's user avatar
9 votes
3 answers
2k views

How does Magento 2 work with CSS grunt-autoprefixer

From looking at a fresh install of Magento 2 (v2.1.8) I see from their Gruntfile.js and package.json files that Magento is using grunt-autoprefixer This is great, CSS autoprefixers are really useful. ...
Holly's user avatar
  • 4,773
1 vote
1 answer
4k views

Grunt: Destination [src path] not written because no source files were found

Currently working with a Magento 2.2.0 theme I made from scratch and I am using Grunt task runner to compile the LESS files to css. Theme structure in app/design/frontend/<vendor>/<...
davisdev's user avatar
1 vote
1 answer
110 views

How to setup grunt themes.js for my theme. Should I point to css folders of blank theme?

I don't know if I should point to the folders I have created under my theme or should I use the ones that I inherit from which is blank. I have created my own folders but they are empty. Can I import ...
Kaki Sami's user avatar
  • 327
0 votes
1 answer
377 views

Magento 2 - Create also symlink to .css

I have managed to successfully install Magento 2 with a downloaded theme after many hours of struggling... Now I'm facing the symlink issue. I've installed everything, php intl extension, grunt, ...
n00bly's user avatar
  • 623
2 votes
1 answer
934 views

Difference between _extend.less . and _extends.less

While working on a custom theme with blank parent theme , I noticed strange behaviors: First of all, gulp and grunt give a different output. Mostly these are parts of code in different order (on gulp'...
AntonioC's user avatar
  • 187
2 votes
0 answers
116 views

magento 2 Grunt watch loads old css when changing imported css file

When I use Grunt Watch my less compile does not work as I expect it to be. When I work directly in my theme. less file all perfectly changes and even with livereload works absolutely great. But ...
Kay Int Veen's user avatar
  • 1,493
0 votes
1 answer
290 views

Can't modify style in custom theme using Grunt

I have custom theme Hiddentechies/bentriz theme.js bentriz: { area: 'frontend', name: 'Hiddentechies/bentriz', locale: 'ja_JP', files: [ 'css/source/custom', 'css/source/...
Dean's user avatar
  • 125
0 votes
2 answers
371 views

Proper Magento 2.1 Frontend develop flow

I am approaching Magento 2 for some projects and I am trying to setup an efficient workflow for frontend developing. So far I followed this guide to setup a theme with a blank theme as a parent. I ...
flero's user avatar
  • 1
0 votes
1 answer
145 views

LESS w/ Grunt - Solutions For M2's Terrible LESS Workflow?

M2 has a grunt / LESS workflow that allows you to automatically compile and view your changes in the browser. However, I can rarely get the live reload to work with the Chrome extension, and when it ...
Harry Manback's user avatar
0 votes
2 answers
322 views

How to install grunt on staging server.?

I just want to edit some files on staging server. How can i install grunt on staging server.? I have run this command: npm install -g grunt-cli error showing that npm: command not found How can i ...
Dipesh Rangani's user avatar
6 votes
5 answers
10k views

How to configure the theme to use Grunt?

I normally change the file /dev/tools/grunt/configs/themes.js but in the .gitignore we can see a configuration file called /dev/tools/grunt/configs/local-themes.js I'd like to use that file instand a ...
Rafael Corrêa Gomes's user avatar
0 votes
1 answer
529 views

Setting up grunt to work with Magento 2.1?

I am following this devdoc to get grunt working in Magento 2.1: http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/css-topics/css_debug.html I followed all of the steps and tried to run grunt ...
lfitzgibbons's user avatar
2 votes
2 answers
6k views

Grunt less:theme fails @media-common is undefined

I am using a theme that I have created based on a third party theme 'Optimus' and I am trying to use Grunt to compile the LESS. However, when I run grunt less:theme it fails with the following error: ...
Phillip Meyer's user avatar
0 votes
1 answer
301 views

Magento 2: Why do Some Tasks Not Show Up in Task List?

If I install the npm project and grunt config that ships with Magento 2 -- I'm able to run commands like grunt clean grunt clean:var etc. However, if I run grunt --help Grunt: The JavaScript Task ...
Alana Storm's user avatar
  • 44.1k
1 vote
1 answer
553 views

Grunt themes.js file overwritten when running composer install

When running the composer install command the www/dev/tools/grunt/configs/themes.js file is being overwritten and removing the config for my custom theme. When searching online I came across the ...
Ryan Copeland's user avatar
2 votes
0 answers
24 views

How to add new theme name to grunt CLI command to run grunt tool in Magento 2 with CLI commands instead of editing less.js and themes.js file?

I read this , But I wanna add new theme name to grunt CLI command with some CLI commands not editing a less.js and thmemes.js manually.Is there any solution for this something Like (magento2 add-...
ali gh's user avatar
  • 731
4 votes
2 answers
2k views

Grunt watch doesn't watch _theme.less and custom less file

That's my css/source file structure: https://i.stack.imgur.com/5tNxJ.png I made grunt clean, theme exec, theme less, watch. Watch is responsive to any less file changes accept of _theme.less and ...
Max.A's user avatar
  • 97
8 votes
1 answer
5k views

How to enable CSS source Maps for Magento 2

How do you enable CSS source Maps for Magento 2's front-end workflow. I'm learning M2 and have created a custom theme, called "mytheme", inheriting from the out-of-box luma theme. I'd like to use ...
Holly's user avatar
  • 4,773
1 vote
2 answers
1k views

Can't get Grunt working for Magento 2

I can't get Grunt working on Magento 2. I'm going through the devdocs and have run the following commands to set up grunt: $ sudo npm install -g grunt-cli /usr/bin/grunt -> /usr/lib/node_modules/...
Holly's user avatar
  • 4,773
2 votes
1 answer
133 views

local grunt database errors, when I have a vagrant magento2 box

I have a vagrant box (debian) with a Magento2 installation for development. Everything works nice, but changing css/less is very very slow (because everytime I have to remove pub/frontend and var/...
user3310748's user avatar
9 votes
2 answers
2k views

Grunt theme source files missing when running Grunt exec

I have a theme that extends the Luma theme. I am trying to get Grunt working to do preprocessing. So far, I don't have any changes/additions in my theme at all. I setup my themes.js as follows: ...
Laura's user avatar
  • 2,690
0 votes
1 answer
131 views

magento 2 grunt less don't see changes in few files

I have problem with Grunt watch. All works good but for example for _theme.css, but don't see any changes after I changing _extend.less what can be wrong?
Lucas D's user avatar
  • 51
2 votes
1 answer
722 views

SyntaxError: Cannot read property 'numerator' of undefined in pub\static\fron \package\theme\en_US\css\source\lib\_responsive.less

SyntaxError: Cannot read property 'numerator' of undefined in pub\static\frontend\package\theme\en_US\css\source\lib_responsive.less on line 44, column 9: 43 @media only screen and (max-width: ...
Satish Rana's user avatar
  • 1,471
0 votes
1 answer
218 views

How I can see the native intern Magento 2 UI library?

I run the grunt documentation but I can't be able to see the docs, I saw a 404 page, why? http://dev.local/redstore/lib/web/css/docs/index.html
Rafael Corrêa Gomes's user avatar
1 vote
2 answers
154 views

Select files on grunt

I don't understand how can configure grunt to get the files i want and write where i want. I'm in Magento 2, and have my own theme, I want Grunt to get the files in: app/design/frontend/Name/theme/...
Muribury's user avatar
  • 141
2 votes
1 answer
3k views

jit-grunt: Plugin for the "clean" task not found

After running grunt clean in magento 2.1.3 root folder I get error If you have installed the plugin already, please setting the static mapping. See https://github.com/shootaroo/jit-grunt#static-...
Jon's user avatar
  • 368
0 votes
1 answer
515 views

install npm for Magento 2 on a system the runs Plesk Onyx without deleteing Plesk

When i try to install npm per apt-get on my Linux machine with Plesk onyx it always want to remove my plesk packages. i still wanna use plesk on my server since its my developer environment. but i ...
Tdotcom's user avatar
  • 27
3 votes
1 answer
732 views

Magento 2 - Registering a new Grunt task without editing Gruntfile.js

Following on from this question: Magento 2 add new theme without changing core files. Grunt The goal is to register a new Grunt task called "development". To do this, grunt.registerTask is needed, ...
Tisch's user avatar
  • 178
0 votes
1 answer
912 views

How to fix grunt permission problems?

When trying to run grunt commands, I get the following error: Error: EACCES, permission denied '/home' at Object.fs.readdirSync (fs.js:665:18) at Glob._readdir (/home/pathto/magento/...
user1608993's user avatar
2 votes
1 answer
97 views

Magento 2.0.7 grunt:less problem

I'm using DigitalOcean one-click-install Magento 2.0.7 installation on ubuntu and I have installed nodejs and grunt following the official tutorials. I added my theme to /dev/tools/grunt/configs/...
raouaoul's user avatar
  • 297
0 votes
1 answer
143 views

Problem with extending Luma theme using Grunt with Less

I am trying to extend from the Luma theme in Magento 2.1 but I ran into several problems. First of all, my theme isn’t extending properly. The templates and xml files all seem to work. My clients ...
Pixelspin's user avatar
5 votes
1 answer
898 views

How to compile gallery and calendar css with grunt?

I have put gallery.less and calendar.css in web\mage\gallery and web\mage respectively in my custom theme, But they are not compile with grunt. How can i compile these files with grunt like other ...
Dipesh Rangani's user avatar
1 vote
1 answer
439 views

Speed up Grunt by proper configuration in Magento2

The short: Whenever I work on my front-end CSS with grunt watch it takes about 13~16 seconds to complete the less task to compile the .less files to css. This is for every save and needless to say it'...
Asitis's user avatar
  • 1,217
1 vote
1 answer
3k views

Problem with installing Grunt on Magento2

I followed this tutorial on installing Grunt on Magento 2. I am running Magento 2.0.7, hosted with one-click app from digitalocean. I only have 'root' user (heard that may cause some problems). After ...
raouaoul's user avatar
  • 297
0 votes
2 answers
999 views

LESS compilation (Grunt) or cache issue

I have started using Grunt, but encountered an issue. I am trying to change styles in custom theme via one of the LESS files, but nothing happens. It worked once, but it doesn't now, and I don't know ...
Gediminas's user avatar
  • 448
3 votes
2 answers
717 views

Why does Magento 2 use PHP to compile less files?

What I don't understand is that since the .less files are already going to be compiled during development through Grunt, why does Magento 2 still uses oyejorge/less to compile less files through PHP? ...
xenon's user avatar
  • 875
3 votes
1 answer
525 views

Magento Grunt Less Compilation behaves weird

I have a custom theme Mycompany/mytheme including <Magento>/<blank> as parent. The locale is set to de_DE. When I execute php bin/magento setup:static-content:deploy de_DE everything ...
juhanix's user avatar
  • 671
4 votes
2 answers
3k views

Difference between static content deploy & grunt exec

What's the difference between following commands (Magento 2) bin/magento setup:static-content:deploy and grunt exec When should you use which command?
Devtype's user avatar
  • 2,978