[Bug]: theme pull - cannot read properties of undefined, when pulling an empty javascript file #4476
Closed
2 tasks done
Labels
Area: @shopify/theme
@shopify/theme package issues
#gsd:40767
Fortify local development experience for Liquid themes
important
second highest 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?
Other
Expected behavior
shopify theme pull --path ./repo --live -e prod --only path/to/empty/file.js
Actual behavior
Error: Cannot read properties of undefined (reading 'length')
Verbose output
$ shopify theme pull --path ./repo --live -e prod --only path/to/empty/file.js
...
2024-09-19T00:06:17.939Z: Request to https://theme-kit-access.shopifyapps.com/cli/admin/api/unstable/themes/130714370137/assets.json?asset%5Bkey%5D=path%2Fto%2Fempty%2Ffile.jscompleted in 539 ms
With response headers:
╭─ error ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Cannot read properties of undefined (reading 'length') │
│ │
│ To investigate the issue, examine this stack trace: │
│ at buildThemeAsset (usr/local/lib/node_modules/@shopify/cli/dist/index.js:145173) │
│ at fetchThemeAsset (usr/local/lib/node_modules/@shopify/cli/dist/index.js:145207) │
│ at processTicksAndRejections (node:internal/process/task_queues:95) │
│ at async downloadFile (usr/local/lib/node_modules/@shopify/cli/dist/index.js:149722) │
│ at async runTask2 (usr/local/lib/node_modules/@shopify/cli/dist/chunk-7QTS6ZWN.js:31139) │
│ at (usr/local/lib/node_modules/@shopify/cli/dist/chunk-7QTS6ZWN.js:31153) │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Reproduction steps
Operating System
linux
Shopify CLI version (check your project's
package.json
if you're not sure)3.67.0
Shell
bash
Node version (run
node -v
if you're not sure)v20.12.2
What language and version are you using in your application?
javascript
The text was updated successfully, but these errors were encountered: