Error on npm run dev

Hi to all,

today I’ve this error after run “npm run dev”

 Success! The tunnel is running and you can now view your app.

error:

(intermediate value).doOnOk(...).mapError(...).valueOrThrow is not a function
To investigate the issue, examine this stack trace:

at generateURL (@shopify/app/src/cli/services/dev/urls.ts:97)
.valueOrThrow()
at processTicksAndRejections (node:internal/process/task_queues:95)
at async generateFrontendURL (@shopify/app/src/cli/services/dev/urls.ts:80)
frontendUrl = await generateURL(options.commandConfig, frontendPort)
at async dev (@shopify/app/src/cli/services/dev.ts:66)
const {frontendUrl, frontendPort, usingLocalhost} = await generateFrontendURL({ 
at run (@shopify/app/src/cli/commands/app/dev.ts:100)
await dev({

I can’t figure out what the problem could be, it seems it can’t “generateFrontendURL”, but I don’t unnderstand why.

Thank you

I fixed it myself, need to update shopify-cli…

For those who don’t know how to update, this should work (worked for me with the same error as the OP)

npm run shopify version

Mine shopify version is latest but still facing this issue :disappointed_face:


Current Shopify CLI version: 3.22.1

Updating the CLI did not make any difference to me but the following command fixed the issue

npm run dev -- --reset

Hi all - thanks for flagging this here.

I haven’t been able to replicate this specific issue with any of my test CLI apps, but have recently needed to upgrade CLI versions and several other dependencies in various apps.

While it was mentioned that it was resolved and others have shared some troubleshooting steps above, I wanted to share a link to the official Github repository - Shopify CLI. This is generally the best place to head first to search for tool related issues, or to create a new issue if you don’t see any that are related.

Cheers!
@awwdam | Shopify Developer Support