提交问题包括堆栈跟踪

发布于 2025-02-08 11:24:56 字数 7000 浏览 2 评论 0原文

我使用命令 - >然后,Shopify主题服务将出现此错误:

X发生意外错误。 提交问题包括堆栈跟踪。

?向Shopify发送匿名错误报告? (您选择:不,不要发送) c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/theme/file.rb:137:in in in 将字符串转换为c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/lib/shopify_cli/shopify_cli/theme/theme/file.rb:137:in <<< /代码>访问_value' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/theme/file.rb:130:in code> in in block in visit_hash in visit_hash' :/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/file.rb:129:in in每个' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/theme/file.rb:129:in in 访问Ruby31-X64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/file.rb:124:in访问_document' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/theme/file.rb:113:in in in normalize_json' Ruby31-X64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/file.rb:81:in checksum' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/theme/sheme/syncer/checksums.rb:20:in file> file> file> file> file> file> file_has_changed?来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/theme/theme/sheme/json_update_handler.rb:19 ' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/theme/sheme/sheme/json_update_handler.rb:19 :/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/theme/sheme/syncer/json_update_handler.rb:19:19:19:19:in in eNqueue_jsson_updates'' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/theme/syncer.rb:173:in upload_theme!''来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/project_types/theme/ui/shenc_progress_bar.rb:11:in public_send'< br> 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/project_types/theme/ui/ui/shenc_progress_bar.rb:11:11:in Code> block in block in inter 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-ui/lib/lib/cli/cli/ui/ui/ui/progress.rb:34:in < /代码>进度' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/project_types/theme/ui/ui/shenc_progress_bar.rb:10:10:10:in in in in in in :/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/project_types/theme/commands/serve.rb:31:31:in Call'in Call'in Call'in Call' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify/shopify_cli/theme/theme/dev_server.rb:56:in in in in in int :/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cliib/lib/lib/cli/cli/ui/ui/frame.rb:103:in打开' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/theme/dev_server.rb:52:in in in in start' ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/project_types/theme themy/commands/commands/serves.rb:30:in in call' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/command/command/sub_command.rb:16:in in in in call' ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/command.rb:27:in call> call' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/core/core/core/core/core/executor.rb:17:in in in block(2级) call'来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/clibib/lib/lib/cli/cli/cli/kit/kit/kit/kit/kit/executor.rb:37:37:37:37:37:在 block(2级别)中,in_logging' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-ui/lib/lib/cli/cli/ui/ui/stdout_router.rb:169:in < code> with_id'来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/lib/cli/cli/cli/kit/kit/kit/kit/executor.rb: 36:在 in_logging'
中 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-ui/lib/cli/cli/ui.rb:176:in in log_output_to'来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/vendor/deps/clibib/lib/lib/cli/cli/cli/cli/kit/kit/kit/kit/executor.rb:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:35:在 with_logging' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/core_cli/core/core/core/executor.rb:16:in Call'call'in Call'in Call' :/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/clibib/lib/cli/cli/cli/cli/kit/kit/kit/kit/executor.rb:45:45:in block(2级)with_traps' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/lib/cli/cli/cli/kit/kit/kit/kit/kit/executor.rb:51:in <代码> twrap'来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-cli-2.18.1/vendor/deps/cli-kit/lib/lib/cli/cli/cli/kit/kit/kit/kit/executor.rb: 44:在
in_traps'
中 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/lib/cli/cli/cli/kit/kit/kit/kit/kit/executor.rb:51:in <代码> twrap'来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/clibib/lib/cli/cli/cli/cli/kit/kit/kit/executor.rb:rb: 43:在
with_traps'中 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/core/core/core/core/executor.rb:15:15:in in 从c:/ ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/core/enter_point.rb:24:in in block in call'''' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/core/core/core/monorail.rb:26:in log'来自c:/c:/ Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/core/enter_point.rb:23:in in
call' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/bin/shopify:50:50:in block(2级别)in&lt; top; top; top; top; top(必需) &gt;'来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/lib/cli/cli/cli/kit/kit/kit/kit/error_handler.rb:75:in < /代码> handle_abort'
来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/lib/cli/cli/cli/kit/kit/kit/kit/error_handler.rb:21:in < code> call'来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/bin/shopify:49:in
in
block in&lt; top; top; top; )&gt;' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/bin/shopify:59:in in &lt; top; top; top(必需)&gt;'从c:/ruby31-x64/bin/shopify:32:in load' 来自c:/ruby31-x64/bin/shopify:32:在``''

i use the command -> shopify theme serve then appears this error:

X An unexpected error occured.
To submit an issue include the stack trace.

? Send an anonymized error report to Shopify? (You chose: No, don't send)
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/file.rb:137:in []=': no implicit conversion of String into Integer (TypeError) from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/file.rb:137:invisit_value'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/file.rb:130:in block in visit_hash' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/file.rb:129:ineach'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/file.rb:129:in visit_hash' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/file.rb:124:invisit_document'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/file.rb:113:in normalize_json' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/file.rb:81:inchecksum'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/syncer/checksums.rb:20:in file_has_changed?' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/syncer/json_update_handler.rb:19:inblock in enqueue_json_updates'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/syncer/json_update_handler.rb:19:in select' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/syncer/json_update_handler.rb:19:inenqueue_json_updates'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/syncer.rb:173:in upload_theme!' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/project_types/theme/ui/sync_progress_bar.rb:11:inpublic_send'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/project_types/theme/ui/sync_progress_bar.rb:11:in block in progress' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-ui/lib/cli/ui/progress.rb:34:inprogress'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/project_types/theme/ui/sync_progress_bar.rb:10:in progress' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/project_types/theme/commands/serve.rb:31:inblock in call'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/dev_server.rb:56:in block in start' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-ui/lib/cli/ui/frame.rb:103:inopen'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/dev_server.rb:52:in start' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/project_types/theme/commands/serve.rb:30:incall'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/command/sub_command.rb:16:in call' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/command.rb:27:incall'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/core/executor.rb:17:in block (2 levels) in call' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:37:inblock (2 levels) in with_logging'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb:169:in with_id' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:36:inblock in with_logging'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-ui/lib/cli/ui.rb:176:in log_output_to' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:35:inwith_logging'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/core/executor.rb:16:in block in call' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:45:inblock (2 levels) in with_traps'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:51:in twrap' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:44:inblock in with_traps'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:51:in twrap' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:43:inwith_traps'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/core/executor.rb:15:in call' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/core/entry_point.rb:24:inblock in call'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/core/monorail.rb:26:in log' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/core/entry_point.rb:23:incall'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/bin/shopify:50:in block (2 levels) in <top (required)>' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:75:inhandle_abort'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:21:in call' from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/bin/shopify:49:inblock in <top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/bin/shopify:59:in <top (required)>' from C:/Ruby31-x64/bin/shopify:32:inload'
from C:/Ruby31-x64/bin/shopify:32:in `'

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

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

发布评论

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

评论(2

我一向站在原地 2025-02-15 11:24:56

嘿,在运行命令之前,请确保您检查以下内容:

  • 您在主题根文件夹中。
  • 您可以使用Shopify登录登录,并且有权编辑主题。
  • 您已连接到互联网。

如果所有这些都检查了所有这些,则可能想将Shopify版本降低到较低版本,例如2.5.0,或在此处的Github中的Shopify Cli中提交错误: https://github.com/shopify/shopify/shopify-cli/issues

Hey before running the command make sure you check these:

  • You are in the theme root folder.
  • You are logged in using shopify login and you have the right to edit themes.
  • You are connected to your internet.

If all of these are checked you might wanna reduce the Shopify version to a lower version like 2.5.0, or submit a bug in Shopify CLI in Github here: https://github.com/Shopify/shopify-cli/issues

少钕鈤記 2025-02-15 11:24:56

我今天遇到了这个问题。

就我而言,我有一个文章。JSON模板文件具有不良的JSON结构。在为块提供了一个值,然后定义类型,标签和限制之后,我能够再次同步我的主题。

错误的结构

"blocks": {
    "title": {
      "type": "article_title",
      "label": "Title",
      "limit": 1
    },
    "type": "article_image",
    "label": "Image",
    "limit": 1
  },

正确的结构

"blocks": {
    "title": {
      "type": "article_title",
      "label": "Title",
      "limit": 1
    },
    "image": {
      "type": "article_image",
      "label": "Image",
      "limit": 1
    }
  },

I ran into this issue today.

In my case, I had an article.json template file with a bad JSON structure. After providing a value for the block and then defining type, label, and limit, I was able to sync my theme again.

Wrong structure

"blocks": {
    "title": {
      "type": "article_title",
      "label": "Title",
      "limit": 1
    },
    "type": "article_image",
    "label": "Image",
    "limit": 1
  },

Correct structure

"blocks": {
    "title": {
      "type": "article_title",
      "label": "Title",
      "limit": 1
    },
    "image": {
      "type": "article_image",
      "label": "Image",
      "limit": 1
    }
  },
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文