Skip to Content
0 likes
Fix "Unexpected token in JSON" Errors Level: Intermediate

"Unexpected token in JSON" means JSON.parse got text that isn't JSON. Read the exact message, log the raw text, and match it to one of five causes. Most of the time it's an HTML error or login page.

0 likes
Your First Test With Vitest Level: Intermediate

Add Vitest to a project you already have and get real tests passing: a pure function with it.each, then an async function that calls fetch, tested with a fake instead of the network.

0 likes
Fix a Bound Event Listener That Will Not Detach Level: Advanced

Trace a wrong callback receiver, bind one stable listener, and verify start, stop and restart without duplicate or stale subscriptions.

0 likes
Add ESLint to an Existing Project Without 500 Errors Level: Advanced

Start with the recommended rules, fix what's automatic, turn noisy rules into warnings, and make CI fail only on new problems. The linter becomes useful on day one instead of ignored.

0 likes
Find a Retained Detached DOM Node With Heap Snapshots Level: Advanced

Trace a detached preview from its DOM node to an application Map, repair cleanup, and verify repeated open-and-close cycles with heap snapshots.

0 likes
Fix a Blank Page When Your HTML File Won't Open Right Level: Beginner

Your HTML file opens blank, shows as text, or downloads instead of rendering. Check the extension, the file:// open path, the doctype and a missing closing tag before you rewrite the page.

0 likes
Read Computed Styles in DevTools Without Guessing Level: Beginner

Trace a reproducible colour and spacing conflict from the rendered result to the winning rule, then verify the repair in the source file.

0 likes
Fix Horizontal Scroll on Mobile in 10 Minutes Level: Intermediate

Reproduce a fixed-width overflow on a narrow screen, locate the offending element and verify a repair without clipping the page.

0 likes
Audit Contrast and Focus Paths Before You Ship Level: Advanced

Measure contrast by number, run axe, and walk the keyboard focus path with a script to catch what the tool cannot see.

0 likes
Fix "Cannot find name" After Renaming a .js File Level: Beginner

Install the Node types, turn them on in tsconfig.json, and switch require to import. Also covers the other causes of the same error: a typo, a missing import and a missing lib.

0 likes
Read a TypeScript Error Message Without Guessing Level: Beginner

Read an error in three passes and match the eight most common phrases to their causes, using real tsc output. After this, a wall of errors is a list you can work through.

0 likes
Function Return Types That Catch Missing returns Level: Beginner

Let a declared return type find a branch with no return, an arrow function with braces, and an async function typed wrong. After this, a function cannot quietly give back undefined.