Deployment errors from enabling early-alpha Baler module
The merchant experiences deployment errors when using the Baler module on a production environment, as the feature is currently in the early alpha development stage.
Affected products and versions
- Adobe Commerce on cloud infrastructure 2.3.x and 2.4.x.
- Adobe Commerce on-premises 2.3.x and 2.4.x.
Issue
We do not recommend that merchants use the Baler module in a production environment, as it is currently in the early alpha development stage. Using it can result in deployment errors.
Steps to reproduce:
- The merchant tries to insert the SCD_USE_BALER variable in the build stage of the
.magento.env.yaml
file, which enables the Baler Javascript bundling package. - The merchant also adds the Baler composer dependency:
"magento/module-baler": "1.0.0-alpha"
torequire
section ofcomposer.json
.
Expected result:
Successful deployment.
Actual result:
The merchant sees the following error message in the deployment logs on the cloud, which is <project home>/var/log/cloud.log
, upon the static content deploy stage:
[2020-08-19 12:06:12] WARNING: [1007] Baler JS bundling cannot be used because of the following issues:
[2020-08-19 12:06:12] WARNING: - Path to baler executable could not be found. The Node package may not be installed or may not be linked.
Cause
The Baler module is currently in the early alpha development stage, and the Baler extension installation process is complex.
Solution
You can review existing Baler Alpha documentation at Github/Magento/Baler/Getting started with the alpha. However, it is not ready for production use, and it is used at your own risk. It is recommended instead that you merge or bundle Javascript (JS) files using Adobe Commerce’s built-in bundling (basic bundling) for file optimization.
- You can turn on merging or bundling in the Admin (merging and bundling cannot be enabled at the same time): Stores > Settings > Configuration > Advanced > Developer > JavaScript Settings.
- You can also enable Adobe Commerce’s built-in bundling (basic bundling) from the command line:
php -f bin/magento config:set dev/js/enable_js_bundling 1
To learn more, refer to CSS and Javascript file optimization on Adobe Commerce on cloud infrastructure and Adobe Commerce on-premises.