What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Error on npm run dev

Solved

Error on npm run dev

ntomassoni
Shopify Partner
5 0 1

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

Nicola Tomassoni
Senior software developer @TourTools srl
Italy
Accepted Solution (1)
ShopifyDevSup
Shopify Staff
1453 238 525

This is an accepted solution.

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](https://github.com/Shopify/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 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 5 (5)

ntomassoni
Shopify Partner
5 0 1

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

Nicola Tomassoni
Senior software developer @TourTools srl
Italy
emranulhadi
Shopify Partner
1 0 1

Mine shopify version is latest but still facing this issue 😞

```

Current Shopify CLI version: 3.22.1

```

phpete
Shopify Partner
1 0 0

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

ayushsoni1001
Shopify Partner
2 0 1

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

npm run dev -- --reset

 

ShopifyDevSup
Shopify Staff
1453 238 525

This is an accepted solution.

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](https://github.com/Shopify/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 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog