iamshaunjp / iamshaunjp/MERN-Stack-Tutorial

Console Error Lesson #9

Open
#5 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
401
Forks
252
PR merge metrics
No merged PRs in 30d

Description

Getting error Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON in the chrome console when running both front end backend lesson #9. Right after you used the proxy.

I copy pasted your repo code into my copy, no fix.

I clone your repo and run it, works fine. Only thing different is the MONGO_URI but that worked fine til now works fine in postman this error is linked to the index setup apparently.

The only other thing I can think of is I am using VITE over CRA but the general methodology should work fine, no?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing lesson #9 with the proxy and inspect the index setup and browser response; compare the Vite copy with the cloned repository that works. The reported HTML document should be compared with the expected JSON response, and the issue is done when the frontend receives JSON without the console SyntaxError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb, postman, vite
Domain
backend, frontend, full-stack
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.