MERN Stack Tutorial - Issue with Delete

Hello,

I hope this message finds you well.

I am new to the MERN stack and came across your awesome tutorial. I believe I have everything up and running just fine, except I can’t seem to get the delete method to work. Create and edit both work (I can see the change locally and also within MongoDB Atlas).

Please see below screenshot:

Any feedback on this would be greatly appreciated!

Kind regards,
Michael

Hi @mijogarc1 ,

I will have a look.

Do you see any errors on the express server side?

I’ve tested the latest code just recently can you refresh it from the git.repo?

Thanks
Pavel

Hi @Pavel_Duchovny ,

Thank you for the speedy response!

I don’t notice any errors on the express server side. Please see below screenshot:
Screen Shot 2021-09-11 at 1.58.40 PM

I’ve worked primarily with the code from the tutorial and have added in any noticeable changes from the git.repo. I can try to clone straight from the git.repo and see if that makes a difference.

Kind regards,
Michael

Hi @mijogarc1 ,

Just noticed that some of the snippets that explains specific code snippets have still 3000 port and not the new 5000 which we changed recently

I will work with our team to fix that. Please make sure there is no localhost:3000 in your code. It should be only localhost:5000

Please test the cloned repo it should work.

Thanks
Pavel

Hi @Pavel_Duchovny ,

Thank you for mentioning this. I caught this when I was cross comparing the code from the tutorial with the code from the git.repo and made the changes accordingly.

I attempted to test and clone the repo. For some reason the delete functionality still does not work. Create and edit seem to still be working fine. This is the error I received:

Kind regards,
Michael

@mijogarc1 ,

It seems like a network issue between the front end and the backend for some reason.

Is that a windows host or another OS? Can you check system logs to see if for some reason the request is getting blocked?

Have you tested this code from a different host?

We have tested this from a few different hosts and the code works, so I believe it is something specific for your host.

Best regards,
Pavel

Hi @Pavel_Duchovny ,

I am using macOS v11.5.2. I will look into the system logs and report back if I notice anything unusual.

I have not tested on a different host but can test on a Windows 10 machine.

Kind regards,
Michael

Hi @mijogarc1 ,

Just wanted to let you know that we have revised some core code on the routing record.js file. This might yield a better result for your issue.

Please test the latest repo code on GitHub - mongodb-developer/mern-stack-example: Mern Stack code for the Mern Tutorial and let us know thanks.

Pavel.

Hi @Pavel_Duchovny ,

Thank you for the update! I have tested the updated record.js file and unfortunately still receive the same error when attempting to delete a record:

I will continue to test on my ends as time permits and provide updates.

Kind regards,
Michael