Questions tagged [grunt]

The tag has no usage guidance.

53 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
1answer
1k 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: ...
3
votes
0answers
304 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
1answer
501 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 ...
2
votes
0answers
119 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 "...
2
votes
0answers
182 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/...
2
votes
0answers
106 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 ...
2
votes
0answers
22 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-...
2
votes
1answer
129 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/...
2
votes
1answer
566 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: ...
2
votes
1answer
84 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/...
2
votes
1answer
642 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 ...
2
votes
1answer
293 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 ...
1
vote
1answer
213 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 ...
1
vote
0answers
56 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
vote
0answers
77 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="...
1
vote
6answers
543 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 ...
1
vote
1answer
54 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 ...
1
vote
1answer
234 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
vote
1answer
632 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
0answers
907 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. ...
1
vote
0answers
132 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 ...
1
vote
1answer
104 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 ...
1
vote
2answers
118 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/...
1
vote
1answer
367 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'...
1
vote
2answers
332 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, ...
1
vote
0answers
474 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: { ...
0
votes
0answers
16 views

Magento 2 - Site loading forever and nothing happens, until I delete cookies

I am developing using grunt. After flushing the cache, It often happens lately that the site is loading forever and nothing happens. There is no error logged in the console and the browser console ...
0
votes
0answers
16 views

Magento 2 grunt odd undefined variable?

I recently built a new fresh theme for Magento 2 and wanted to make a start on styling the buttons, inputs etc globally, I've set my local-themes file to the right position and set it up as it should. ...
0
votes
2answers
90 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
0answers
12 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
35 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
16 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
451 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
49 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 ...
0
votes
1answer
22 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
1answer
69 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
260 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 ...
0
votes
1answer
143 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
2answers
42 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 ...
0
votes
0answers
133 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 ...
0
votes
1answer
501 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
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 ...
0
votes
2answers
305 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 ...
0
votes
1answer
474 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 ...
0
votes
1answer
122 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?
0
votes
1answer
194 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
0
votes
1answer
680 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/...
0
votes
1answer
114 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 ...
0
votes
1answer
196 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....
0
votes
0answers
379 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', ...