글

RangeError: Maximum call stack size exceeded - 10 Causes and Fixes

이미지
RangeError: Maximum call stack size exceeded means your code called functions faster than it returned from them, until the JavaScript engine ran out of room to track them. Nine times out of ten it is a recursion that never reaches its base case — the classic javascript recursion error — but the tenth time it is a getter calling itself, a React effect re-triggering its own dependency, or a perfectly fine function fed 200,000 arguments at once. The stack is a fixed-size region the engine uses to remember where to return to. Every active call takes a frame. When frames exceed the limit, V8 throws this RangeError instead of corrupting memory. This page gives you the one-line fix first, then ten distinct causes with runnable reproductions, then a checklist for the case where your stack trace is just the same two frames repeated 10,000 times and tells you nothing. Error RangeError: Maximum call stack size exceeded Where it happens JavaScript — browser or Node.js, any framework. Th...

fatal: not a git repository (or any of the parent directories): .git - 10 Causes and Fixes

이미지
You ran a Git command and got fatal: not a git repository (or any of the parent directories): .git . That message means exactly one thing: Git walked up from your current directory to the filesystem root and never found a .git entry, so it has no repository to operate on. This is not a corruption error and not a network error. It is a location error — either you are standing in the wrong directory, or the directory you expected to be a repository never became one, or the .git directory is there but unreadable by the process that asked. Below: the one-line fix that covers most cases, then 10 distinct causes with a reproduction and a fix for each, a diagnostic checklist for the cases that match none of them, and an explanation of why Git is designed to fail this way. Error fatal: not a git repository (or any of the parent directories): .git Where it happens Git CLI on any OS (Linux, macOS, Windows, WSL), and anything that shells out to git: IDE Git panels, CI runners, Docker ...

401 Unauthorized - 10 Causes and How to Fix the HTTP 401 Error

이미지
Your request came back with 401 Unauthorized and nothing in the response body tells you why. Despite the name, 401 Unauthorized is not about permissions - it means the server could not authenticate you at all: the credentials were missing, malformed, expired, or meant for a different audience. That distinction matters because it cuts your search space in half. If you had been authenticated but lacked permission, you would be looking at 403 Forbidden instead. A 401 says the server does not know who you are. This page walks the ten causes that account for nearly every 401 in practice, most common first, each with a reproduction you can run and the exact lines that fix it. If your case does not match any of them, skip to the diagnostic checklist - it narrows an unknown 401 down in five steps. Error HTTP/1.1 401 Unauthorized WWW-Authenticate: Bearer realm="api", error="invalid_token" Where it happens Any HTTP client against any server - curl, fetch, axios, r...

TypeError: 'NoneType' object is not subscriptable - 10 Causes and Fixes

이미지
TypeError: 'NoneType' object is not subscriptable means you used [...] on a value that is None . Python raises this the moment you write x[0] , x["key"] , or x[1:3] and x happens to be None - the subscript operator simply does not exist on the NoneType type. The traceback tells you where the subscript happened, not where the None came from. That gap is the whole debugging problem: the real bug is usually several lines (or several functions) earlier, at the point something returned None and you assumed it returned a dict, a list, or a string. This page lists the concrete ways a None gets into a subscript - functions with a missing return , mutating methods like sort() and append() , regex search() misses, dict.get() on an absent key, JSON null , DB queries with no rows - each with a reproduction, the fix, and a way to verify. If your case does not match any of them, work the diagnostic checklist instead. Error TypeError: 'NoneType' object i...