Skip to main content

Command Palette

Search for a command to run...

Adobe Commerce Cloud - Set up Magepack

Published
1 min read
Adobe Commerce Cloud - Set up Magepack

Goal

The goal is to use Magepack on the ACC instance.

Steps

Default hooks build configuration looks like the following: File: .magento.app.yaml

hooks:
    # We run build hooks before your application has been packaged.
    build: |
        set -e
        composer install
        php ./vendor/bin/ece-tools run scenario/build/generate.xml
        php ./vendor/bin/ece-tools run scenario/build/transfer.xml

We need to install Node.js and generate the bundle. To do this, we need to change the file in the following way: File: .magento.app.yaml

hooks:
    # We run build hooks before your application has been packaged.
    build: |
        set -e
        composer install
        unset NPM_CONFIG_PREFIX
        curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
        export NVM_DIR="$HOME/.nvm"
        [ -s "$NVM_DIR/nvm.sh"  ] && \. "$NVM_DIR/nvm.sh"
        nvm install --lts=erbium
        npm install -g magepack
        php ./vendor/bin/ece-tools build:generate
        echo "Generating magepack bundle..."
        magepack bundle
        php ./vendor/bin/ece-tools build:transfer

Now we need to make deployment and check if the commands execution was successful.

N

[2024-02-07T13:54:18.943759+00:00] NOTICE: Skipping static content deploy: No stores/website/locales found in config.php [2024-02-07T13:54:18.943937+00:00] INFO: Scenario(s) finished ℹ Using bundling config from "/app/magepack.config.js". W: W: ERROR No locales found! Make sure magepack is running after static content is deployed. how to fix this error