Today I am trying to execute grunt exec:all
and grunt exec
commands. Unfortunertly it shown me a error. Earlier it was working fine.
Later I had try to install new Magento 2 setup. Still the error is same:
I stuck over here.
I tried following with the help of devdocs:
- re-install
nodejs
- re-install
npm
- re-isntall
grunt-cli
- re-install
grunt
Other tools/commands are working fine for grunt like grunt less:luma
and at all. Only the issue is into grunt exec
.
Can anyone suggest me what is going wrong here? in magento 2?
Best Answer
grunt exec is esentially a shorthand for clearing the folders
var/view_preprocessed
,var/generation
,var/log/system.log
andpub/static
and runningSo before running grunt commands you need to make sure that your comand line php is the same as the server php and that it has access to the database.
var
andpub/static
folders.bin/magento
and make sure it isa+x
(your issue).Gruntfile.js
is located.