Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [grunt]

The tag has no usage guidance.

0
votes
1answer
32 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 ...
0
votes
0answers
8 views

How to create symlinks to all source files after changing git branch?

I am working in git workflow. I want to know how I can create symlinks to source files after changing git branch? Let's say I have three root source files in my theme that are located as below. app\...
0
votes
0answers
13 views

Grunt CSS compile has stopped working

I had setup grunt on my application and to get it setup I normally just run: grunt clean grunt exec:lfa grunt less:lfa grunt watch Then i'm ready to go and start working on the theme and it worked ...
1
vote
0answers
11 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
20 views

Grunt Causing High CPU Usage

I Have installed Grunt on server. When I hit URL after less files changed the CPU Usage goes up-to 99-100%. The server is Linux. The changes gets reflected correctly. The issue which comes after first ...
0
votes
0answers
60 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 ...
6
votes
1answer
225 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
57 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
31 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 ...
0
votes
1answer
70 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 ...
4
votes
2answers
124 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/...
1
vote
0answers
41 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 "...
0
votes
0answers
42 views

Using Grunt to watch JS files

I have been following this guide to theme development with M2 and Grunt. I have set this up, but it is only watching Less files. Is there a guide to get grunt to watch for changes in JS files as well?
1
vote
1answer
298 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
108 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
81 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
61 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:...
2
votes
4answers
541 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
175 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
66 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!
4
votes
1answer
1k 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
576 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
2k 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 ...
0
votes
1answer
712 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
59 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 ...
3
votes
1answer
698 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
1k 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 "...
1
vote
2answers
104 views

Magento 2 - How to use grunt or gulp for speed up development?

I have heard that using grunt/gulp can speed up development by automatically cleaning the static content directories and compiling and generating new css. How can we configure these and achieve this. ...
1
vote
0answers
131 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
64 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
0answers
82 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/...
0
votes
1answer
108 views

Cannot override _forms.less

Ive tried to override the _forms.less file in my theme but its only extending the original _forms.less. My file is placed under app/design/frontend/Vendor/Theme/web/css/source/_forms.less. I am ...
7
votes
3answers
773 views

How does Magento 2 work with CSS grunt-autoprefixer

From looking at a fresh install of Magento 2 (v2.1.8) I see from their Gruntfile.js and package.json files that Magento is using grunt-autoprefixer This is great, CSS autoprefixers are really useful. ...
1
vote
1answer
945 views

Grunt: Destination [src path] not written because no source files were found

Currently working with a Magento 2.2.0 theme I made from scratch and I am using Grunt task runner to compile the LESS files to css. Theme structure in app/design/frontend/<vendor>/<...
1
vote
1answer
74 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 ...
0
votes
1answer
207 views

Magento 2 - Create also symlink to .css

I have managed to successfully install Magento 2 with a downloaded theme after many hours of struggling... Now I'm facing the symlink issue. I've installed everything, php intl extension, grunt, ...
2
votes
1answer
340 views

Difference between _extend.less . and _extends.less

While working on a custom theme with blank parent theme , I noticed strange behaviors: First of all, gulp and grunt give a different output. Mostly these are parts of code in different order (on gulp'...
2
votes
0answers
58 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 ...
0
votes
1answer
183 views

Can't modify style in custom theme using Grunt

I have custom theme Hiddentechies/bentriz theme.js bentriz: { area: 'frontend', name: 'Hiddentechies/bentriz', locale: 'ja_JP', files: [ 'css/source/custom', 'css/source/...
0
votes
2answers
236 views

Proper Magento 2.1 Frontend develop flow

I am approaching Magento 2 for some projects and I am trying to setup an efficient workflow for frontend developing. So far I followed this guide to setup a theme with a blank theme as a parent. I ...
0
votes
1answer
79 views

LESS w/ Grunt - Solutions For M2's Terrible LESS Workflow?

M2 has a grunt / LESS workflow that allows you to automatically compile and view your changes in the browser. However, I can rarely get the live reload to work with the Chrome extension, and when it ...
0
votes
2answers
242 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 ...
3
votes
4answers
4k views

How to configure the theme to use Grunt?

I normally change the file /dev/tools/grunt/configs/themes.js but in the .gitignore we can see a configuration file called /dev/tools/grunt/configs/local-themes.js I'd like to use that file instand a ...
0
votes
1answer
270 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 ...
3
votes
2answers
2k views

Grunt less:theme fails @media-common is undefined

I am using a theme that I have created based on a third party theme 'Optimus' and I am trying to use Grunt to compile the LESS. However, when I run grunt less:theme it fails with the following error: ...
0
votes
1answer
179 views

Magento 2: Why do Some Tasks Not Show Up in Task List?

If I install the npm project and grunt config that ships with Magento 2 -- I'm able to run commands like grunt clean grunt clean:var etc. However, if I run grunt --help Grunt: The JavaScript Task ...
1
vote
1answer
371 views

Grunt themes.js file overwritten when running composer install

When running the composer install command the www/dev/tools/grunt/configs/themes.js file is being overwritten and removing the config for my custom theme. When searching online I came across the ...
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-...
4
votes
1answer
1k views

Grunt watch doesn't watch _theme.less and custom less file

That's my css/source file structure: https://i.stack.imgur.com/5tNxJ.png I made grunt clean, theme exec, theme less, watch. Watch is responsive to any less file changes accept of _theme.less and ...
6
votes
1answer
2k views

How to enable CSS source Maps for Magento 2

How do you enable CSS source Maps for Magento 2's front-end workflow. I'm learning M2 and have created a custom theme, called "mytheme", inheriting from the out-of-box luma theme. I'd like to use ...