Open WinstonN opened 4 years ago
try in this order:
1) disable bundling:
php bin/magento config:set dev/js/enable_magepack_js_bundling 0
2) clean and flush cache:
php bin/magento cache:clean
php bin/magento cache:flush
3) Go to the
directory and remove all the contents within that directory:
cd
rm -rf *
be very careful when using this command!
(rather than using the *
wildcard with the rm
command, it is safer to name all the directories and files you intend to remove in the
directory:
e.g rm -rf adminhtml frontend
4) go back to the
directory and run the deploy command and include any language locales you may need:
php bin/magento setup:static-content:deploy en_US -f
5) run the bundle command:
magepack bundle
6) reenable magesuit bundling:
php bin/magento config:set dev/js/enable_magepack_js_bundling 1
7) flush the cache:
php bin/magento cache:flush
Now open firefox or chrome browser and use the developer tools to inspect if js file are bundled.
What error do you have? it is hard to investigate without that. ah damn, it is in the title, silly me. in that case, you may need to regenerate the static content one again, have you try that in local or in the cloud? this article help me last time https://blog.gaiterjones.com/magento-2-javascript-bundling-with-magepack/
how to deploy on cloud hooks:
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 gulp-cli
# Run npm commands in the specific design folder
(cd ./app/design/frontend/Fluid/blank/ && npm install && gulp)
# Install magepack globally in one command
npm install magepack -g
php ./vendor/bin/ece-tools build:generate
magepack bundle
php ./vendor/bin/ece-tools build:transfer
deploy: | php ./vendor/bin/ece-tools run scenario/deploy.xml
post_deploy: | php ./vendor/bin/ece-tools run scenario/post-deploy.xml
How to Fix this error ℹ Using bundling config from "/app/magepack.config.js". W: W: ERROR No locales found! Make sure magepack is running after static content is deployed.
Hi
On magento default 2.3.5-p2 I'm getting this error when I run
magepack bundle
I have the patch installed
I do have the MagePack Magento 2 Module installed and
bin/magento config:set dev/js/enable_magepack_js_bundling 1
I run
bin/magento setup:static-content:deploy -f
but still get the errorCan you spot what I am doing wrong?