Questions tagged [grunt]
The grunt tag has no usage guidance.
49
questions with no upvoted or accepted answers
3
votes
0
answers
158
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 "...
3
votes
0
answers
603
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
1
answer
536
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
0
answers
352
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 ...
2
votes
0
answers
237
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="...
2
votes
0
answers
267
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
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 ...
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-...
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/...
2
votes
1
answer
790
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
1
answer
113
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
1
answer
851
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
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 ...
1
vote
0
answers
19
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
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 ...
1
vote
1
answer
128
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
1
answer
520
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
1
answer
1k
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
0
answers
205
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
1
answer
113
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
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/...
1
vote
1
answer
463
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
2
answers
361
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
0
answers
558
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: {
...
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.
...
0
votes
0
answers
9
views
Watcher for phtml and JS files also
That will be fine to make able grunt livereload watcher for phtml and JS files also. Any ideas?
0
votes
0
answers
69
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 ...
0
votes
1
answer
57
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 ...
0
votes
2
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
196
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
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
312
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
1
answer
70
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
1
answer
189
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/...
0
votes
1
answer
491
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
2
answers
53
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
0
answers
197
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
1
answer
778
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
71
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
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 ...
0
votes
1
answer
546
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
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?
0
votes
1
answer
223
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
1
answer
1k
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
1
answer
221
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
0
answers
391
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',
...
0
votes
1
answer
675
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/...
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:...
0
votes
2
answers
369
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.