[Bug]: ERROR on theme dev command when package.json in folder #4400
Labels
Area: @shopify/theme
@shopify/theme package issues
moderate
lowest severity for theme related bug
Type: Bug
Something isn't working
Please confirm that you have:
In which of these areas are you experiencing a problem?
Theme
Expected behavior
when running:
shopify theme dev --environment=my-env-here
I expect the theme to be served locally and the terminal not to return an error.
Actual behavior
after running the command it starts as expected: it serves the theme locally but then it also throws an error but doesnt stop the process. So it is still possible to preview the theme.
but the error is:
Syncing theme #136509423777 on surf-turf-2-0.myshopify.com 100% • 10:29:29 ERROR » update package.json: The asset #<struct ShopifyCLI::Theme::File path=#<Pathname:/Users/studiohenk-nh/Sites/shopify-henk/package.json>> could not be synced (cause: undefined method
dig' for nil) /usr/local/Cellar/shopify-cli/3.66.1/libexec/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb:241:inparse_api_errors' /usr/local/Cellar/shopify-cli/3.66.1/libexec/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb:203:in
handle_operation_error'/usr/local/Cellar/shopify-cli/3.66.1/libexec/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb:301:in
rescue in perform' /usr/local/Cellar/shopify-cli/3.66.1/libexec/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb:300:in
perform'/usr/local/Cellar/shopify-cli/3.66.1/libexec/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb:159:in
block (3 levels) in start_threads' <internal:kernel>:187:in
loop'/usr/local/Cellar/shopify-cli/3.66.1/libexec/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb:155:in
block (2 levels) in start_threads'
Verbose output
/Users/studiohenk-nh/.nvm/versions/node/v20.16.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15: warning: observer was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add observer to your Gemfile or gemspec.
/Users/studiohenk-nh/.nvm/versions/node/v20.16.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15: warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec.
DEBUG GET https://theme-kit-access.shopifyapps.com/cli/admin/api/unstable/themes.json with request_id: 412791bd-bc62-4724-a1b1-b7fb0143580b-1725007037
DEBUG GET https://theme-kit-access.shopifyapps.com/cli/admin/api/unstable/themes/136509423777/assets.json with request_id: 7d4373e8-5377-4cc9-85c6-d8fcceb25938-1725007037
DEBUG ignore node_modules/@shopify/liquid-html-parser/package.json
DEBUG ignore node_modules/@shopify/prettier-plugin-liquid/package.json
DEBUG ignore node_modules/html-styles/index.json
DEBUG ignore node_modules/html-styles/package.json
DEBUG ignore node_modules/isarray/component.json
DEBUG ignore node_modules/isarray/package.json
DEBUG ignore node_modules/isobject/package.json
DEBUG ignore node_modules/line-column/package.json
DEBUG ignore node_modules/ohm-js/package.json
DEBUG ignore node_modules/prettier/package.json
DEBUG update package.json
DEBUG PUT https://theme-kit-access.shopifyapps.com/cli/admin/api/unstable/themes/136509423777/assets.json with request_id: dd203e1f-b7ef-4078-9c6f-032172ab1f26-1725007038
100%
• 10:37:19 ERROR » update package.json:
The asset #<struct ShopifyCLI::Theme::File path=#Pathname:/Users/studiohenk-nh/Sites/shopify-henk/package.json> could not be synced (cause: undefined method
dig' for nil) /Users/studiohenk-nh/.nvm/versions/node/v20.16.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb:241:in
parse_api_errors'/Users/studiohenk-nh/.nvm/versions/node/v20.16.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb:203:in
handle_operation_error' /Users/studiohenk-nh/.nvm/versions/node/v20.16.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb:301:in
rescue in perform'/Users/studiohenk-nh/.nvm/versions/node/v20.16.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb:300:in
perform' /Users/studiohenk-nh/.nvm/versions/node/v20.16.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb:159:in
block (3 levels) in start_threads'internal:kernel:187:in
loop' /Users/studiohenk-nh/.nvm/versions/node/v20.16.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/lib/shopify_cli/theme/syncer.rb:155:in
block (2 levels) in start_threads'[2024-08-30 10:37:19] INFO WEBrick 1.7.0
[2024-08-30 10:37:19] INFO ruby 3.3.4 (2024-07-09) [x86_64-darwin22]
[2024-08-30 10:37:19] INFO WEBrick::HTTPServer#start: pid=28245 port=9292
DEBUG Refreshing preview _shopify_essential cookie
DEBUG Proxying HEAD https://theme-kit-access.shopifyapps.com/cli/sfr/?preview_theme_id=136509423777&_fd=0&pb=0
DEBUG
-> 302 request_id: 7de74eea-ea3c-4a3c-a7b0-e17614c44808-1725007045 DEBUG Proxying GET https://theme-kit-access.shopifyapps.com/cli/sfr/?_fd=0&pb=0&preview_theme_id=136509423777&_fd=0&pb=0 DEBUG
-> 302 request_id: 141c0886-3f47-4423-96bd-e0775e3492a4-1725007046DEBUG Proxying GET https://theme-kit-access.shopifyapps.com/cli/sfr/?_fd=0&pb=0&_fd=0&pb=0
DEBUG
-> 200 request_id: 7d72d658-1545-4f4c-a8d5-fc3151696efa-1725007046 DEBUG Renew _shopify_essential cookie by the response DEBUG [HotReload] Connected to SSE stream DEBUG Proxying GET https://theme-kit-access.shopifyapps.com/cli/sfr/checkouts/internal/preloads.js?locale=en-NL&_fd=0&pb=0 DEBUG
-> 404 request_id: 009cafe7-7f90-4b59-a8f2-d98f0834d1cf-1725007048Reproduction steps
Operating System
MacOS 13.4 Ventura
Shopify CLI version (check your project's
package.json
if you're not sure)3.66.1
Shell
zsh
Node version (run
node -v
if you're not sure)v20.16.0
What language and version are you using in your application?
No response
The text was updated successfully, but these errors were encountered: