Have your say in Community Polls: What was/is your greatest motivation to start your own business?
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.

Running npm run dev and getting Error forwarding web request in my terminal

Running npm run dev and getting Error forwarding web request in my terminal

cipherB
Shopify Partner
1 0 0

After following the shopify create an app documentation, whenever i run 'npm run dev' i keep getting 'Error forwarding web request: Error: connect ECONNREFUSED 127.0.0.1:40021' when i try to open the installed app in my store.

Reply 1 (1)

Liam
Community Manager
3108 344 889

Hi CipherB,

 

This Error forwarding web request error usually happens when the development server isn't running or isn't accessible. Here are a few things you can try to fix the issue:

  1. Check if your development server is running: The error message implies that nothing is listening on port 40021. Make sure that your development server is running and is set to listen on the correct port.

  2. Check your firewall settings: Your firewall might be blocking the connection to the server. You can try to temporarily disable your firewall and see if the error persists.

  3. Try a different port: The port you're using might be already in use by another service. Try changing the port for your development server.

  4. Check your network connection: Make sure that your computer is correctly connected to the network.

  5. Reinstall dependencies: There might be an issue with your project's dependencies. Try deleting your node_modules directory and your package-lock.json file, and then run npm install again.

If none of these steps solve the issue, please provide more information about your setup, and we can dive into this issue further. Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me 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