devnotes
Short, correct answers to specific development questions.
Comparisons
-
pnpm vs npm workspaces: which should you use for a monorepo?
Use pnpm once your monorepo grows past a handful of packages; npm workspaces is the right call for a small repo. The deciding factor is strict dependency isolation, not install speed.
Read the note → -
Vitest vs Jest: which should you use?
For a new project or any Vite-based stack, use Vitest; stay on Jest for a large legacy CommonJS codebase with deep mocking, and for React Native.
Read the note → -
Bun vs Node.js: which should you run in production?
For a new project with no hard Node-only dependency, Bun is a reasonable default. Choose Node for maximum compatibility, LTS guarantees, and mature observability.
Read the note →
Fixes
-
CORS preflight request returns 403: how do you fix it?
A 403 on the preflight almost always means your auth middleware is rejecting the OPTIONS request before your CORS handler runs. Let OPTIONS through.
Read the note → -
npm ERESOLVE 'unable to resolve dependency tree': how do you fix it?
It's a peer-dependency conflict. The fast safe fix is npm install --legacy-peer-deps; the real fix is to read the conflict block and align the versions.
Read the note → -
Git 'fatal: refusing to merge unrelated histories': how do you fix it?
The two branches share no common commit ancestor. Fix it with git pull --allow-unrelated-histories, but only if you actually mean to join the histories.
Read the note →
Guides
-
TypeScript 7.0: what breaks, and how do you check before migrating?
A green tsc isn't a green migration. Removed tsconfig flags and Compiler-API tooling (ts-morph, typedoc, type-aware eslint) break silently — here's the check order that catches both before tsgo --noEmit does.
Read the note → -
How do you validate an MCP server against the spec?
Two jobs, two tools: the official Inspector for interactive checks, and a conformance linter to fail a pull request when the server drifts from the spec.
Read the note → -
How do you cancel a fetch request in a React useEffect?
Create an AbortController in the effect, pass its signal to fetch, and call abort() in the cleanup return. Swallow the AbortError so an intentional cancel isn't an error.
Read the note →