Questions tagged [grunt]

The tag has no usage guidance.

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

Grunt css changes not showing in browser

New to Magento so please be patient with me. I've created a custom theme using Magento/blank as its parent. Grunt is detecting changes im making to the css files but the changes are not showing on the ...
0
votes
0answers
12 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....
0
votes
0answers
10 views

How do you configure Grunt to extend magento blank styles?

I'm trying to setup Grunt with Magento 2.4. But I'm unsure of how to setup the .less files. I've created a theme that is based on the magento blank theme. In my web/css directory I have: web/css/...
0
votes
0answers
131 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
1answer
50 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 ...
1
vote
0answers
39 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
0answers
256 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
1answer
31 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
1answer
22 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
1answer
206 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
1answer
185 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
1answer
21 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>/<...
0
votes
0answers
17 views

Magento2 grunt watch stops at last

I have install grunt by at last it stops & doesn't execute sudo grunt watch:fittings Running "watch:fittings" (watch) task Waiting... Grunt stops at last..........
0
votes
1answer
40 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/...
0
votes
1answer
166 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 ...
1
vote
1answer
130 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\...
0
votes
1answer
259 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 ...
1
vote
1answer
409 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 ...
1
vote
1answer
66 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&...
0
votes
1answer
100 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" (...
0
votes
1answer
58 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.
0
votes
2answers
41 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 ...
5
votes
2answers
164 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
0answers
65 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
2answers
106 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
2answers
27 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
6answers
475 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
3answers
3k 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
1answer
51 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
0answers
130 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
2answers
603 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 ...
1
vote
2answers
215 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
2answers
38 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
1answer
215 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 ...
5
votes
2answers
196 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/...
2
votes
0answers
108 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 "...
1
vote
1answer
1k 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
1answer
444 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
1answer
119 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 ...
2
votes
0answers
229 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
4answers
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 {...
1
vote
1answer
560 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
1answer
129 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!
7
votes
1answer
4k 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 ...
1
vote
2answers
1k 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 ...
0
votes
4answers
4k 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 ...
2
votes
1answer
1k 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/...
0
votes
1answer
62 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 ...
2
votes
1answer
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 ...
3
votes
2answers
3k 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 "...