Help Required facing error running my app on localhost please help!

Hello Everyone!!

I’m new to dfinity and started working recently but stuck at one issue.
ICP backend and frontend canister url running well after I ran dfx deploy.
Please refer the screen shot.


Candid UI:

Both is working but if I run dfx deploy and then try to do npm start then my browser asks credentials & I’m unable to proceed. As a result my code written to connect backend to frontend I’m not able to verify.
refer below screenshot of terminal & issue.

If I run npm start in new terminal without dfx deploy then it is creating new localhost 8081 and I’m not facing issue to load the url in browser. But this url do not connect with ICP code.

Please help as I’m not sure how to resolve this.

Can you explain why you want to run npm start after dfx deploy? You can see the frontend on the local chain, so why would you also want to npm start?

I tried few things and then realized since my index.js and main.css had comments at start due to which may be when I used frontend url then my css did not load properly. Also did not observed any connection between frontend and backend as data was not getting pulled from the backend.

I’m new to ICP & dfinity so I’m referring to some tutorial online and as per that dfx deploy must be followed by npm start to get the localhost url.

Even the blog I referred talks about npm start to deploy dapp locally.

but now my issue is fixed thanks :slight_smile:

1 Like

:person_facepalming: npm start is simply unnecessary. dfx deploy takes care of it all. I’ll remove it from the tutorial.

As a next step I would like to deploy app to IC but just received below message from discord.
If anyone with foundation role can dm me the coupon at my id: @nomad0109