the error you describe occurs if Shopware is unable to resolve the bootstrap dependency. The spacer variable and the mix-in is normally defined by bootstrap. Are you using the installation package from our website or have you checked out the code from GitHub?
Which command prior to bin/console theme:compile have you executed?
npm --prefix vendor/shopware/storefront/Resources/ clean-install [this worked and installed all dependencies]
I’ve tried after that to run again ‘bin/console theme:compile’ but I get the same error.
Based on installation steps from developer edition I’ve runned this command too:
npm --prefix vendor/shopware/storefront/Resources/ run production
This is throwing the following error:
Error: Cannot find module ‘@shopware/webpack-copy-after-build’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
…
I finnally managed to get it work and I’ll post the solution here:
After a clean project git setup(from github) or from the installation zip file available on the site(but using the .gitignore file from github) following steps must be done:
copied „/app/vendor/shopware/platform/src/Storefront/Resources/app/storefront/node_modules/tiny-slider“ to „/app/vendor/shopware/platform/src/Storefront/Resources/app/storefront/vendor/tiny-slider“
copied „/app/vendor/shopware/platform/src/Storefront/Resources/app/storefront/node_modules/jquery“ to „/app/vendor/shopware/platform/src/Storefront/Resources/app/storefront/vendor/jquery“
copied „/app/vendor/shopware/platform/src/Storefront/Resources/app/storefront/node_modules/flatpickr“ to „/app/vendor/shopware/platform/src/Storefront/Resources/app/storefront/vendor/flatpickr“
copied „/app/vendor/shopware/platform/src/Storefront/Resources/app/storefront/node_modules/bootstrap“ to „/app/vendor/shopware/platform/src/Storefront/Resources/app/storefront/vendor/bootstrap“