Questions tagged [grunt]

The tag has no usage guidance.

50 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
156 views

Grunt (Magento 2) - Why do I have to force my commands?

I've just installed grunt for the first time however I cannot run any commands in cmd wihtout using --force. My error is: C:\wamp64\www\New_Mage2>grunt watch jit-grunt: Plugin for the "...
Greg's user avatar
  • 399
3 votes
0 answers
581 views

Plugins less with Magento Theme

Good morning, I would like to know if somebody has worked with less plugins in Magento Environment? Indeed, I met no difficulties with grunt tools, but when Magento compile all files (through setup:...
Ilan Parmentier's user avatar
3 votes
1 answer
533 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
2 votes
0 answers
328 views

Magento2 eslint entire custom code

I've noticed Magento2 has Javascript Coding Standards, in which they reference an eslint config file. Suppose I have an M2 project I'm developing with a large group of folks and I'd like the team to ...
quickshiftin's user avatar
  • 1,416
2 votes
0 answers
225 views

How magento decides order of all _module.less file imported through @magento_import directive?

I am trying to add module specific less file named _module.less inside my custom module Mynamespace_Mymodule in M2. For that I have created module.xml file with below sequence. <module name="...
Shashank Bhatt's user avatar
2 votes
0 answers
264 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
2 votes
0 answers
118 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,503
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
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
2 votes
1 answer
775 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,491
2 votes
1 answer
103 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
  • 307
2 votes
1 answer
844 views

Debugging LESS files with Firebug / Chrome Dev tools Magento 2

I am trying to figure out how to display the LESS file and line number pre compilation in developer tools so that I can see where I need to be editing. I have previously got this up and running with ...
user3250's user avatar
2 votes
1 answer
299 views

Magento 2 - Grunt Watch in Vagrant Environment

I'm running into this issue where when I ssh into my Vagrant VM and run grunt watch while editing css, it totally boggs down my system. I hear the fan speed up and if left running, my VM grinds to a ...
Paul's user avatar
  • 1,501
1 vote
0 answers
18 views

Different frontend CSS results (Grunt vs deploy:mode:set production)

I have a weird issue where the frontend results of a grunt compile are different compared to a compilation after deploy:mode:set production. UI elements are different. Why is that? How can I debug/...
Akif's user avatar
  • 1,531
1 vote
1 answer
1k views

Magento 2 - Could not load content for ... (HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE)

I am using grunt with livereload to compile my less files. Grunt also generates source maps so that I can directly see in my browser, in which LESS files css code is located. But often when I click to ...
Black's user avatar
  • 3,340
1 vote
1 answer
120 views

Grunt workflow, problems with watch task and reloading

I've been trying to get the "grunt watch" task running combined with livereload but unfortunately I'm not able to get a working solution. I've read the magento devdocs but running a combination of the ...
John Plusje's user avatar
1 vote
1 answer
502 views

Magento2 grunt issue occurs when running?

I am using Magento2 version CE-2.2.4 i installed npm,grunt on fresh project but when i am running command grunt exec:theme then it create an error Loading "Gruntfile.js" tasks...ERROR ...
Magento Dev's user avatar
  • 1,264
1 vote
1 answer
988 views

How to install node_modules in server for grunt configuation

As a designer I am totally new to magento 2 file structure and preprocessing. As far as my understanding is correct, magento uses less files and uses gruntfile.js for preprocessing so that via ...
Shashank Bhatt's user avatar
1 vote
1 answer
2k 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
200 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
1 vote
1 answer
111 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
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
1 vote
1 answer
461 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,247
1 vote
2 answers
349 views

Grunt configuration Magento 2

Using the php bin/magento and deploying static content does work without throwing errors. This means that it's just having a problem getting Grunt going. Processed Area: frontend, Locale: en_US, ...
camdixon's user avatar
  • 560
1 vote
0 answers
551 views

How to use grunt-uncss with Magento?

When I'm running "grunt uncss" I have the following error : Fatal error: PhantomJS: Cannot open about:blank Here is my Gruntfile.js : uncss: { dist: { files: { ...
Lanks's user avatar
  • 514
0 votes
0 answers
41 views

Grunt task for the tailwind in magento 2 frontend

We are working on the custom theme with the tailwindCSS. Normal Magento flow is taking a long time to reflect the changes on the browser. My question is there any configuration or way to use Grunt to ...
Naveen Raj Kumar's user avatar
0 votes
1 answer
32 views

How to use Multiple custom .less files in Magento 2 using Grunt.js

We are developing a custom theme for our Front Store view so we need to use multiple .less files in web/css/source. with the help of Grunt.js, the development makes us faster than manually generating ...
Naveen Raj Kumar's user avatar
0 votes
0 answers
23 views

Magento 2 Grunt Install Error on Ubuntu LEMP

npm install -g grunt-cli Showing Error on Grunt Install Error on Ubuntu LEMP: npm notice npm notice New major version of npm available! 8.5.5 -> 9.6.7 npm notice Changelog: https://github.com/npm/...
matinict's user avatar
  • 1,559
0 votes
2 answers
959 views

Magento 2 : How Can I Add custom.less File For Only Specific Page?

how can i add custom.less file for any specific page in child theme? means don't need genrate inside my custom css code in style-l.css or style-m.css and i have already 2 methods used. Method 1. ...
Gaurav's user avatar
  • 29
0 votes
2 answers
959 views

Magento 2.4.1. Grunt exec error

I have tried this on a clean install of magento 2.4.1 I then went to a magento 2.3.6 ran grunt exec and grunt less both worked After upgrading the 2.3.6 to 2.4.1 the grunt exec then failed with the ...
Phes's user avatar
  • 86
0 votes
0 answers
193 views

Magento 2.4 alternatives to Livereload Chrome extension for live styling via Grunt?

Magento officially recommends Livereload for "watching" changes made via Grunt and updating the browser in real-time without reloading the page for each change here: https://devdocs.magento....
Louis B.'s user avatar
  • 1,111
0 votes
0 answers
2k views

How to install grunt within docker container?

I finally was able to finish installing M2 enterprise cloud on docker for local dev, and the one final step is to install grunt so I can do some frontend work. I've been trying to wrap my head around ...
Terence Patane-Ronan's user avatar
0 votes
1 answer
300 views

Static content generation: problems with grunt exec and grunt less

I'm working on a Magento 2.3.4 website that has a custom theme, developed by a different party. I need to modify some .less files and I noticed something strange. grunt exec, that should publish the ...
Peter Karsai's user avatar
0 votes
1 answer
65 views

Magento2 how to define theme in my themes.js

What is the correct way to define theme in theme.js dev/tools/grunt/configs/themes.js My theme in app/design is Hose/Fit <theme>: { area: '<area>', name: '<Vendor>/<...
Arjun's user avatar
  • 3,586
0 votes
1 answer
181 views

Magento2 grunt error

> npm install -D load-grunt-config npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) npm ERR! Linux 4.15.0-52-generic npm ERR! argv "/usr/bin/...
Arjun's user avatar
  • 3,586
0 votes
1 answer
460 views

Magento 2 local Docker - running less:theme fails for file not found, but file is present

I finally have a local docker setup for my Magento 2 development set up. It works fine everywhere, except for when I run grunt less:MyTheme. When I do that I get this error Running "less:MyTheme" (...
Asitis's user avatar
  • 1,247
0 votes
2 answers
52 views

Magento 2.3 grunt compile

My simple question is that, Do i need to compile less with grunt in magento? My theme is working fine. However i am not sure that i need to compile less with grunt or not. Is there any impact on ...
Ashar Riaz's user avatar
  • 1,035
0 votes
0 answers
196 views

Magento 2.3 admin not working after grunt setup

I have a big problem.I setup grunt configuration for magento 2.3 as I used to setup for magento 2.2 and renamed below files grunt-config.json.sample, package.json.sample and gruntfile.js.sample by ...
Shashank Bhatt's user avatar
0 votes
1 answer
770 views

Import new custom less files after grunt configuration

I am using grunt tool for magento server-side less preprocessing. I have created _extend.less file following directory structure for my custom less compilation app\design\frontend\Vendorname\...
Shashank Bhatt's user avatar
0 votes
1 answer
70 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
  • 656
0 votes
2 answers
324 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
0 votes
1 answer
541 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
0 votes
1 answer
139 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
0 votes
1 answer
222 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
0 votes
1 answer
967 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
0 votes
1 answer
219 views

Magento 2 Theme - grunt watch with overridden {module}.scss

we are working on a magento 2 theme and followed the official guidelines regarding structure, naming and grunt. there is a correct grunt config and everything works fine with local styles (eg. local-l....
dkiss's user avatar
  • 1
0 votes
0 answers
389 views

How do you manage dev/tools/grunt/configs/themes.js file with version control in magento2?

The themes.js file contains important configuration and without it you cannot run grunt tasks for your theme: #dev/tools/grunt/configs/themes.js mytheme: { area: 'frontend', ...
Claudiu Creanga's user avatar
0 votes
1 answer
670 views

Configure Grunt to watch the overrided vendor module css - Magento2

I have included this module into my project via composer require: https://github.com/JakeSharp/ProductSliderM2 This module has three css files that are being added to each page by the vendor/...
Florin-Adrian Serbu's user avatar
0 votes
1 answer
71 views

Blank pages after grunt clean

I've set up an new theme in Magento 2 and everything was looking fine. I installed Grunt and changed all necessary files (I think) I then did the following: Grunt clean, grunt exec:myTheme, grunt less:...
Mark's user avatar
  • 755
0 votes
2 answers
367 views

Grunt exec clear pub folder

When i use grunt exec:theme it clears all files in pub/static but does not copy new images, scripts and fonts. I dont have any errors in CLI. I clear all cache and i use grunt refresh.
Maciej's user avatar
  • 153