Questions tagged [grunt]
The grunt tag has no summary.
131 questions
0 votes
1 answer
98 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 ...
1 vote
1 answer
72 views
Change livereload host
The default livereload host is 127.0.0.1, but I have the access problems to access the this host directly in WSL2. Need to change it to http://localhost:35729/livereload.js Found the solution to ...
0 votes
2 answers
1k 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. ...
2 votes
1 answer
559 views
Magento 2 - Can't compile new theme, which inherits from luma
I created a new minimalistic theme in a fresh Magento 2.4.2 The theme inherits from Magento/luma Example: app/design/frontend/company/foo/registration.php: <?php /** * Copyright © Magento, Inc. ...
0 votes
1 answer
715 views
CSS Source Maps are empty after grunt refresh
On Magento 2.4.1, Developer Mode and SSR after running grunt clean grunt exec grunt less # OR grunt refresh Generated Source Maps looks like this {"version":3,"sources":[],"...
1 vote
0 answers
24 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/...
0 votes
3 answers
1k 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 ...
0 votes
0 answers
264 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....
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 ...
0 votes
1 answer
895 views
Magento 2 - Can't compile theme in production mode anymore | Unable to retrieve deployment version of static files from the file system
I get this error when trying to execute grunt refresh or grunt exec:all. [2020-08-17 05:25:31] report.CRITICAL: Can not load static content version. [] [] [2020-08-17 05:25:31] report.ERROR: Unable to ...
4 votes
1 answer
470 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 ...
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 ...
0 votes
1 answer
357 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 ...
1 vote
1 answer
255 views
Is it absolutely REQUIRED that you install grunt globally for it to work out of the box with Magento 2?
Documentation at https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/tools/using_grunt.html states to install grunt using the -g (global) command, which requires elevated privileges. ...
2 votes
1 answer
949 views
locally installed grunt, "grunt exec:blank" fails with "/bin/sh: grunt: command not found"
I am hosted at Nexcess and tried to implement Grunt to assist with LESS development. I followed the Magento 2 docs for installing grunt. NodeJS 10.10.0 is installed. The first deviation from the ...