Magento2: Grunt config is overwritten on Magento updates via composer

Created on 26 Oct 2016  路  10Comments  路  Source: magento/magento2

This issue occurs on composer upgrades of Magento CE 2.x.x

Latest instance occurs in upgrade to Magento CE version 2.1.2

Steps to reproduce

  1. Configure your theme for Grunt in /dev/tools/grunt/config/themes.js
  2. Update Magento using composer

Expected result

  1. Magento should update but not overwrite configuration files

Actual result

  1. /dev/tools/grunt/config/themes.js is overwritten with the default version
Frontend Format is not valid Ready for Work bug report

Most helpful comment

@omiroshnichenko described solution in #8910

  • Copy grunt-config.json.sample to grunt-config.json.

    • Copy dev/tools/grunt/configs/themes.js to dev/tools/grunt/configs/local-themes.js

    • Specify your themes config in dev/tools/grunt/configs/local-themes.js

All 10 comments

@mombrea please identify which version of Magento you are running.

@veloraven Updated to indicate Magento 2 CE through version 2.1.2

I have experienced this also several times, was not sure if it was a bug or not.

Internal issue MAGETWO-61147

@omiroshnichenko described solution in #8910

  • Copy grunt-config.json.sample to grunt-config.json.

    • Copy dev/tools/grunt/configs/themes.js to dev/tools/grunt/configs/local-themes.js

    • Specify your themes config in dev/tools/grunt/configs/local-themes.js

@mombrea the issue has been fixed in develop branch. Thank you for reporting the issue
@Igloczek thank you for the provided fix

This is still a problem for Magento 2.1.10

@dakira The fix was released with 2.2, but you can do a backport of my PR to 2.1-develop branch

@Igloczek I spent two days on trying to get frontend less compilation to run with grunt for M 2.2 without success which is why I moved back to 2.1.

I would say a backport is a bit more involved than just your 4 commits. The whole grunt toolchain would have to be modified (https://github.com/magento/magento2/commit/5c76ada4a409f2a9948b3ac3efd9899cff36c1b6)

Why would you like to backport toolchain from 2.2 to 2.1, if you just said it's not working for you?

IMO you are just trying to mix two separated topics together, while if your issue is really the one described in this issue (overwriting of you custom, working configuration), you should care only about backporting the content of .gitignore from #8910

Was this page helpful?
0 / 5 - 0 ratings