- Firstly check if you've installed Node.js & Grunt in your machine.
Go to your Magento 2 installed directory.
Execute following command in your terminal or cmd.
npm install -g grunt-cli Rename package.json.sample to package.json.
Then execute following command.
npm install
- Make sure your dev/tools/grunt/configs/themes.js has proper configuration.
Rename Gruntfile.js.sample to Gruntfile.js.
Then run following commands.
grunt clean grunt exec:<grunt theme name> grunt less:<grunt theme name> For example
grunt clean grunt exec:luma grunt less:luma Then afterwards
grunt watch