Questions tagged [grunt]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

.less file source map not showing in web browser with Magento 2.4.4

i have use magento 2.4.4 and 2.4.5. this issue happen on both of versions. i have configure grunt properly & less compile working fine but does not show source map in browser inspect element : ...
  • 15
0 votes
0 answers
36 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 in style-l.css or style-m.css. i have already use 2 methods 1.method app/design/frontend/Kinex/theme/web/...
  • 15
0 votes
0 answers
6 views

Magento 2: Js file not created once we execute the grunt command

I have added the grunt but when i execute the below command then css file is generated but js file is not created inside the pub/static/frontend/ Missing file is : en_US/requirejs/require.js, en_US/...
  • 1,022
0 votes
0 answers
23 views

Luma Child Custom Theme Grunt not copying js files

Magento 2.4.4 running on Xampp Windows 10. Luma Child Custom Theme Grunt not copying js files When i do a normal "deploy" from cli its fine. php bin/magento setup:static-content:deploy when ...
  • 101
1 vote
1 answer
49 views

Magento 2 - Can't compile new theme Theme inheriting 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. ...
  • 2,541
0 votes
1 answer
126 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":[],"...
0 votes
0 answers
25 views

Grunt Livereload to reload just the styles

Added "grunt-contrib-livereload": "^0.1.2" to sass compile grunt config. Yes, it's reloading, but whole DOM. Magento 2 native config reloader reloading just the styles, not page ...
  • 87
1 vote
0 answers
15 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/...
  • 1,358
0 votes
2 answers
584 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 ...
  • 66
0 votes
0 answers
129 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,063
1 vote
1 answer
634 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 ...
  • 2,541
0 votes
1 answer
380 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 ...
  • 2,541
2 votes
0 answers
199 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 ...
  • 1,366
0 votes
0 answers
994 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
173 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
100 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. ...
1 vote
1 answer
668 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 ...
0 votes
1 answer
722 views

Unable to get Grunt less task working on Custom Magento theme

Good morning, I'm pretty new to Magento 2 and I'm currently in the process of trying to get my first custom M2 theme up and running. I have managed to create my new theme but running into trouble ...
0 votes
1 answer
34 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>/<...
  • 3,466
0 votes
1 answer
138 views

Magento2 grunt error

> npm install -D load-grunt-config npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) npm ERR! Linux 4.15.0-52-generic npm ERR! argv "/usr/bin/...
  • 3,466
0 votes
1 answer
892 views

Magento 2 LESS - Unable to resolve the source file for ..., after deleting source file

I deleted a less file which I don't need anymore. I also removed the entry from default_head_blocks.xml so that it does not load anymore. I searched my whole theme for main.css and removed all ...
  • 2,541
1 vote
1 answer
477 views

Magento 2 - Grunt watch not detecting changes of _extend.less

I have these files: THEME = app\design\frontend\company\base THEME\web\css\source\lib\extend\variables\_typography.less THEME\web\css\source\lib\extend\variables\_colors.less THEME\web\css\source\...
  • 2,541
0 votes
1 answer
582 views

Magento 2 - LiveReload is connected, but changes are only visible after manual reload

I try to use grunt watch in combination with livereload. But there is almost no documentation on the topic. I installed livereload like this: npm install -g livereload Then I added the following ...
  • 2,541
1 vote
3 answers
1k views

Magento 2 - css source maps not working

I created a new theme which extends from magento luma. I try to develope with less instead of css. I need to enable CSS Source maps, so that I can debug my less, it helps to see in which less files ...
  • 2,541
1 vote
1 answer
295 views

i cant set up grunt due an error

i want to create luma based theme and set up grunt for it. path to .less files: frontend///web/css/source/style-l.less im getting an error: unable to resolve the source file for 'frontend/<vendor&...
  • 11
0 votes
1 answer
317 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" (...
  • 1,218
0 votes
1 answer
129 views

Add grunt-notify to M2 Grunt config

How to add grunt-notify module to Magento 2 Grunt config. Reference: https://github.com/dylang/grunt-notify Thanks.
  • 87
0 votes
2 answers
49 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 ...
7 votes
2 answers
269 views

Different less compilation results between grunt and server side compilation

I got the following theme inheritance setup: Vendor/Retail inherits from Vendor/Default which inherits from Magento/blank When compiling the styles with grunt I get no issues. When compiling with ...
1 vote
0 answers
147 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="...
4 votes
2 answers
123 views

Create less file for custom Theme

How to create new *.less file in Magento 2.3 project ? Here is my existing Theme: Here is my existing less file that DOES NOT work: Nothing is work here: My question is how to add custom less code/...
2 votes
2 answers
29 views

Page Styling (css) does not appear in the new Theme implementation (descendant of Luma Theme)

I just created empty theme which is descendant of Luma theme. but unfortunately the styling is not appear: theme.xml <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
1 vote
6 answers
803 views

run grunt in mangeto 2

Already follow from this dev document this 1.npm install -g grunt-cli 2.Rename 3 files - package.json.sample into package.json - Gruntfile.js.sample into Gruntfile.js - grunt-config.json.sample ...
2 votes
3 answers
5k views

Magento 2 Theme Development - grunt watch not detecting changes of custom LESS file

We are running Magento 2 in version 2.3.1, but the error occurred in version 2.3.0 also. The situation is the following: we've created a custom theme which has Magento/luma theme as parent. according ...
1 vote
1 answer
78 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 ...
0 votes
0 answers
170 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 ...
8 votes
2 answers
812 views

Grunt compile of LESS fails with Error compiling lib/web/css/docs/source/docs.less

I'm hoping to get some advice. I pulled a project that I haven't touched in some time and in developer mode I ran 'grunt exec' followed by 'grunt less' and once running 'grunt less' I receive the ...
  • 524
1 vote
3 answers
318 views

What is Grunt in Magento2 and Why use?

What is Grunt in Magento2? Why use grunt. I want to know detail about Grunt. When we can use Grunt.
1 vote
2 answers
39 views

mess up ownerships after cli action

so I am running a magento 2.2.4 in development and one in production, the dev is ok and I can do all, the production is an exact copy of it on apache 2.4 and Ubuntu 16.04, every time I use any kind of ...
1 vote
1 answer
386 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 ...
  • 1,214
5 votes
2 answers
242 views

Magento 2.2.5 Css is not generating

I have one project in Magento 2.2.5 and in that the CSS is stopped generating I have run all grunt command and in that it show below error when i run grunt exec pub/static/frontend/Magento/luma/en_US/...
3 votes
0 answers
143 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 "...
  • 399
1 vote
1 answer
2k views

Magento2: Missing commands on build server

I try to make a Magento2 Pipeline Deployment and running in a awkward error. But first a few words to the deployment: I use a docker container with installed php and nodejs. I copy in the container ...
0 votes
1 answer
669 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\...
0 votes
1 answer
134 views

How to declare and use custom configuration file for less compilation with grunt?

According to devdocs which is located at https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/tools/using_grunt.html#grunt_config Now I simply can't understand what it is trying to say.Can ...
3 votes
0 answers
453 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:...
3 votes
4 answers
2k views

Grunt, .less, and Live Reload - Can't get them working

Good afternoon, I am having a devil of a time getting my front-end flow working. I have grunt CLI working, along with theme.js setup properly (see images below). Still, when I make changes within my {...
  • 103
1 vote
1 answer
834 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 ...
1 vote
1 answer
166 views

Magento2 Keeping CSS changes after redeployment [duplicate]

Hi I am new to Magento 2, I was wondering what methods people are using to keep CSS changes after they deploy static content as CSS changes are overwritten every time. Thanks!
  • 11
7 votes
1 answer
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 ...
  • 11.4k