失败构建Shopify主题应用程序扩展

发布于 2025-02-11 06:20:48 字数 488 浏览 2 评论 0原文

我正在尝试使用CLI 3.0构建主题应用程序扩展名,我设法在应用程序上创建扩展名,但是我有2个基本问题:

  1. 每当我将JS文件添加到资产文件夹或液体文件中时,失败,即使文件为空(如果我删除文件,则构建也通过) - 这是运行npm run build build时遇到的错误

命令因退出代码1:捆绑exec exec-check/users/omerdotan/projects/shopify-omer-test-app-2/extensions/extensions/omer-theme-theme-extension-testension-test-2 -c:them_app_extension

  1. app不显示应用程序在主题上 - 我将应用程序附加到商店,并启用了主题扩展程序的开发人员预览,但它没有显示可用的应用程序(对于主题设置和块上的两个应用程序嵌入)

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

断舍离 2025-02-18 06:20:48

我遇到了类似的问题。

我的解决方案:

  1. 安装rbenv https://github.com/rbenv/rbenv/rbenv 〜/.zshrc 使用nano〜/.zshrc
  2. 使用rbenv安装最新的Ruby版本(3.1.2)
  3. 目标RBENV版本到最新版本,该版本由RBENV Global 3.1.2 < /code>
  4. 重新打开终端和gem install bundler
  5. 重新打开Shopify终端和npm运行部署

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文