Open sekam opened 2 years ago
Hey, it is not advised to run bundle generation during CI. You can do that, but as you can see it is problematic and I am unable to support all server configurations to make it work for everybody.
Ideally, you should generate configuration locally, commit magepack.config.js
file to the repo and use it to bundle during CI.
You may like to add npm config set puppeteer_skip_chromium_download true -g
before npm install -g magepack
. This is what we use with success on Cloud to run magepack bundle
. (We run magepack generate
locally and commit magepack.config.js
per above recommendation.)
The snippet you pasted above from .magento.app.yaml
doesn't include running any magepack
commands, so it's hard to see what's going on / help you further. Here's a known-working 'build' step:
build: |
set -e
unset NPM_CONFIG_PREFIX
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 12.13
npm config set puppeteer_skip_chromium_download true -g
npm install magepack -g
php ./vendor/bin/ece-tools build:generate
magepack bundle
php ./vendor/bin/ece-tools build:transfer
hi @fredden. Interesting problem Is this may cause fail building cloud ? without text "npm config set puppeteer_skip_chromium_download true -g" build process will fail
We had a problem with Magento Cloud during launch "magepack generate"
We added in the .magento.app.yaml (by recommendations https://support.magento.com/hc/en-us/articles/360022507012-Configure-NPM-to-be-able-to-use-PWA-Studio)