Shopify CLI error when calling "npm run dev"

Topic summary

Main issue: After updating the locally installed Shopify CLI (command-line interface) to newer minor versions, running “npm run dev” now fails with “Cannot read properties of undefined (reading ‘output’)”. Reverting to the previously working CLI version did not resolve it.

Context: Shopify docs now recommend a global CLI install; the app owner kept a local install to avoid breaking changes. An image attachment shows a stack trace with multiple chunk files (central to diagnosing, but unclear to the author). Past intermittent issues with Cloudflare Tunnel raise suspicion, but no confirmation.

Observations/troubleshooting:

  • Error appears during the dev flow that includes a store password prompt.
  • No code changes were made besides CLI updates and reinstall.

Peer feedback:

  • Could be a CLI bug; suggested action is to file an issue on the Shopify CLI GitHub repo.
  • Another developer reports the same error when migrating from local to global CLI and separate CLI login issues on a remote machine, noting perceived instability in the dev server.

Status: Unresolved. Next step: open a GitHub issue; unclear if Cloudflare Tunnel is involved.

Summarized with AI on December 18. AI used: gpt-5.

Hi,

I’ve been working on an app for over a year and i’m now ready to deploy. I read the Shopify docs relating to deployments, and I found that Shopify now recommends installing the CLI globally, whereas it used to recommend a local install per project. I didn’t want to risk anything breaking, so I’ve left the CLI a local install to the project, but I did go ahead and upgrade the CLI a number of minor versions becuase mine had gone a little out of date.

Since updating my package.json file to use the latest CLI version, and running npm install, my app now generates an error when running npm run dev where the following error appears in the terminal:

Cannot read properties of undefined (reading ‘output’)

To investigate the issue, examine this stack trace:

I reverted back to my original version which has been working for me over the last 9 months+ and now I still get this error.

The stack trace includes a whole bunch of chunk files which mean nothing to me when I look at them. Here’s the stack trace output with the above error, in case it helps. I’ve redacted any file paths as I assume it’s only text in yellow that’s going to be helpful to anyone reading this:

I’m very frustrated with this, so really hoping someone is able to offer advice. After a long development period I’m keen to be able to finally launch this application, so I really appreciated any help anyone can give.

Note: In the past i’ve had issues that randomly come up with no change to my own code, only for it to be related to CloudFlare Tunnel issues. Might that be at play here, and it’s just coincidiental that this issue occurs right as I was going to update the CLI?

Thanks

Mat

When you run npm run dev, there is a part asking you for the store password. The error message looks like something related to this part. If you think it’s a bug, you can submit an issue on the Shopify CLI github repo. Others can do almost nothing if it’s a bug of CLI. I am stuck at an issue about CLI login in my remote machine for a week.

I try to migrate from local CLI to global CLI and my error is the same. IMO, the CLI dev server is becoming more unstable recently…