提交问题包括堆栈跟踪
我使用命令 - >然后,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
每个' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/theme/theme/file.rb:129: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
inin
访问
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
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 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
inupload_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
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 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
inin
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
call' 来自c:/ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/bin/shopify:50:50:in in
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 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_traps'in
in_logging'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:在
中 来自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
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:在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
中 来自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:在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 从c:/ ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.18.1/lib/shopify_cli/core/enter_point.rb:24:in
inlog'来自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
inblock(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'
in
来自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:inin
&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:in
visit_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:in
each'
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:in
visit_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:in
checksum'
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:in
block 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: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.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:in
public_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:in
progress'
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:in
block 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:in
open'
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:in
call'
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:in
call'
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:in
block (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:in
block 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:in
with_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:in
block (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:in
block 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:in
with_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:in
block 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:in
call'
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:in
handle_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:in
block 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:in
load'
from C:/Ruby31-x64/bin/shopify:32:in `'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嘿,在运行命令之前,请确保您检查以下内容:
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:
shopify login
and you have the right to edit themes.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
我今天遇到了这个问题。
就我而言,我有一个文章。JSON模板文件具有不良的JSON结构。在为块提供了一个值,然后定义类型,标签和限制之后,我能够再次同步我的主题。
错误的结构
正确的结构
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
Correct structure