Search code examples
shopifyshopify-appshopify-template

Fail building shopify theme app extension


I'm trying to build a theme app extension using CLI 3.0, I managed to create the extension on my app but I have 2 basic issues:

  1. Whenever I add a js file to the assets folder or a liquid file to the blocks folder the build fails, even if the file is empty (build passes if I remove the file) - this is the error I get when running npm run build

Command failed with exit code 1: bundle exec theme-check /Users/omerdotan/projects/shopify-omer-test-app-2/extensions/omer-theme-extension-test-2 -C :theme_app_extension

  1. The app doesn't appear on the theme - I attached the app to the store and enabled the developer preview for the theme extension,but it show no apps available (for both App embeds on theme settings and blocks)

Solution

  • I was running into similar issues.

    My solution:

    1. Install rbenv https://github.com/rbenv/rbenv, set required ~/.zshrc file using nano ~/.zshrc
    2. Use rbenv to install latest Ruby version (3.1.2)
    3. Target rbenv version to latest version by rbenv global 3.1.2
    4. Reopen terminal and gem install bundler
    5. Reopen shopify terminal and npm run deploy