5

I am using orocommerce 4.2.1 from AWS marketplace. I made some changes in scss and want to build the assets. When i run the command php74 bin/console oro:assets:build --env=prod

I get the following:

[centos@ip-172-31-28-85 commerce]$ php74 bin/console oro:assets:build --env=prod Building assets. '/usr/bin/node' './node_modules/webpack/bin/webpack.js' '--hide-modules' '--mode=production' '--env.stats=' '--env.symfony=prod' '--colors' [webpack-cli] Error: Unknown option '--hide-modules' [webpack-cli] Run 'webpack --help' to see available commands and options

In OroAssetsBuildCommand.php line 247:

How can I remove this --hide-modules. I tried removing from package.json but nothing works?

2 Answers2

2

It seems you have upgraded the "webpack-cli" NPM package to 4, but the OroCommerce 4.2 LTS is compatible only with "^3.3.12". To fix an error, you have to downgrade the package back to 3.3.12 version.

Andrey Yatsenko
  • 1,936
  • 1
  • 11
  • 13
2

It's works for me

You can remove --hide-modules.

However, it is recommended that you use the mix executable. Please refer to the upgrade guide: https://github.com/JeffreyWay/laravel-mix/blob/628f6062cceb77610b1813e3179abcbd043a4642/UPGRADE.md#update-your-npm-scripts

Najathi
  • 2,529
  • 24
  • 23