JSON.parse unexpected error
I am making a MERN stack app where I have made a DB using Mongo Atlas and using node.js and express to fetch the data in my react app. I am calling the data using an
I am stuck here and cant solve this. I tried many different posts on net but none worked for me.
The backend server is running on
I would really appreciate any and all help
useEffect() and awaiting the data as well. When I am trying to convert the data into json, it is giving me the error of Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON dataI am stuck here and cant solve this. I tried many different posts on net but none worked for me.
The backend server is running on
localhost:4000 and react app is on localhost:5173. I tried CORS and even adding a proxy in package.json but that also didnt work.Here is my Github link:
https://github.com/Pulkit-s21/_mernStack/tree/main/_workoutAppI would really appreciate any and all help
GitHub
Projects using MERN stack. Contribute to Pulkit-s21/_mernStack development by creating an account on GitHub.
