Econnrefused

Good day everyone, there’s an issue that am currently facing now, am using a localhost on my computer to view client in the browser, after running npm start on my terminal in vs code. The website opens first with the login page like it supposed too, if u are a new user u should click on register button which is detailed small in that same login page, after I did that i.e registering a new account on clicking register it said “something went wrong” later on checking developers tools in that drop down menu it should this :point_right: failed to load resource: the server responded with a status of 500(Internal server error)" The issue is from my register.js file but I have no idea how to resolve that though, someone said the issue is because I didn’t use api/register and which I used I have followed even what chatgpt I.e chat.openai.com website told me but couldn’t still fix it, even unistall and installed still not working or removing it.

Hi @Agent6threturn,

Welcome to the forum.

You are going to need to give us a bit more to go on. What are you logging into? Is this a tutorial you are following? Some examples of your code would also be helpful.

Thanks

I am trying to create an inventory website, whenever I click register button after inputting my details it says something went wrong normally that’s what I inputted in my res.send in my editor to show something is wrong. I don’t know how I can explain to u more so u will understand.
So on checking developer tools in my browser that’s when I saw the error failed to load resource: the server responded with a status of 500(Internal server error)

Thanks @technobear for editing my post

Please sir, is there any way I can send my codes to u?

Hi again,

I may not be the person to solve this for you. The point of the forum is that you will benefit from the shared wisdom and expertise of our members. Furthermore other’s who are stuck on a similar problem will be able to find this thread and learn from it too.

If you can copy and paste your code here, or provide a link to your source code for instance github, or alternatively I believe you can use something like https://replit.com/ for NodeJS, that would enable us to help you.

For your information when posting code in the text editor, select your code and then click on the </> menu icon at the top of the editor. This will convert it to a code block for you.

Thanks.

2 Likes

Thanks sir I really appreciate ur comment, will do what u said sir

1 Like

What is the resource that it has failed to load?
Some things are loade3d by the browser that you do not need
For example I get this every reload
GET http://localhost/favicon.ico 404 (Not Found)

It doesn’t stop the page from loading or js from running.

1 Like

Good day sir thanks for the reply. Okay back to ur first line it is saying failed to load resource: the server responded api/users/register:1 with a status of 500( Internal server error)
Pls I will provide my github code below for you to check it out sir my project https://github.com/Dglory1/POS-MERN

Okay this is for the github sir https://github.com/Dglory1/POS-MERN

The replit website is hanging so I can’t continue with the upload maybe the github link to my project code will help with the one above

Maybe this is the time to accept that AI is not able to write useable code for you…

Noo sir I am not using Ai to write code for me I just wanted to upload my file or folder from vs code directly to replit

Well as " The HTTP status code 500 is a generic error response. It means that the server encountered an unexpected condition that prevented it from fulfilling the request . This error is usually returned by the server when no other error code is suitable."
the first step would be to find out what is causing the server to respond with a status code 500.
I assume that there are no error messages when the page loads and that status code 500 message is in response to attempting to register or log in.
I also assume that when you submit the registration form there is a uri that the form is sent to.
So firstly check that the http request is formatted correctly and contains the correct data.

Just for reference, Agent6threturn seems to be following this tutorial (Hindi)

The accompanying final github to that tutorial can be found here

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.