P0 Content Briefs

These briefs are the first writing sprint from planning/p0-content-queue.md. Each brief must become a Korean and English post with the same translation_id.

Brief 1: pip install failed

Required sections:

  1. Problem: show common outputs such as ERROR: Could not find a version that satisfies the requirement, Failed building wheel, and permission errors.
  2. Cause: separate package name typo, unsupported Python version, stale pip, virtual environment mismatch, network/proxy, and OS build dependency issues.
  3. Quick fix: upgrade pip, confirm active Python, install inside venv.
  4. Windows commands:
    py -m pip --version
    py -m pip install --upgrade pip setuptools wheel
    py -m pip install package-name
    
  5. macOS/Linux commands:
    python3 -m pip --version
    python3 -m pip install --upgrade pip setuptools wheel
    python3 -m pip install package-name
    
  6. Verification: import the package and check python -m pip show package-name.
  7. Common mistakes: using pip from another interpreter, installing globally while running venv Python, copying smart quotes from a blog.

Internal links to add:

Ad notes:

Brief 2: No module named pip

Required sections:

  1. Problem: include No module named pip and explain why plain pip can be misleading.
  2. Cause: pip was not installed, Python installation is incomplete, virtual environment was created without pip, or PATH points to a different Python.
  3. Quick fix with ensurepip.
  4. Commands:
    python -m ensurepip --upgrade
    python -m pip install --upgrade pip
    python -m pip --version
    
  5. Windows fallback:
    py -m ensurepip --upgrade
    py -m pip install --upgrade pip
    
  6. Verification: python -m pip --version points to the expected Python directory.
  7. Prevention: always use python -m pip in posts.

Internal links to add:

Ad notes:

Brief 3: Python venv not activating

Required sections:

  1. Problem: explain expected prompt changes and why prompt changes are not the only proof.
  2. Cause: wrong activation script, PowerShell execution policy, wrong terminal, deleted venv, or IDE interpreter mismatch.
  3. Activation commands by shell:
    .\.venv\Scripts\Activate.ps1
    
    .venv\Scripts\activate.bat
    
    source .venv/bin/activate
    
  4. PowerShell policy fix:
    Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
    
  5. Verification:
    python -c "import sys; print(sys.executable)"
    
  6. Common mistakes: activating from the wrong directory, using VS Code before selecting interpreter, mixing Conda and venv.

Internal links to add:

Ad notes:

Brief 4: Python command not found on Windows

Required sections:

  1. Problem: include python is not recognized, Microsoft Store alias behavior, and py launcher.
  2. Cause: PATH missing, App Execution Alias conflict, terminal not restarted, multiple Python installs.
  3. Quick fix: try py --version first.
  4. Commands:
    py --version
    py -0p
    where python
    where py
    
  5. PATH fix: describe adding Python and Scripts directories through Windows settings.
  6. Verification:
    py -m pip --version
    python --version
    
  7. Common mistakes: editing system PATH without reopening terminal, installing from Store unintentionally, using pip before confirming interpreter.

Internal links to add:

Ad notes:

Brief 5: externally-managed-environment

Required sections:

  1. Problem: quote the error name and explain it appears when pip protects system-managed Python.
  2. Cause: distro or package manager owns the Python environment.
  3. Quick fix: create a project venv and install there.
  4. Commands:
    python3 -m venv .venv
    source .venv/bin/activate
    python -m pip install --upgrade pip
    python -m pip install package-name
    
  5. Alternatives: use pipx for CLI tools; use package manager for system packages.
  6. Warning: mention --break-system-packages only as a last resort and explain risk.
  7. Verification: which python, python -m pip --version, and package import.

Internal links to add:

Ad notes:

Brief 6: npm ERR ERESOLVE

Required sections:

  1. Problem: show ERESOLVE unable to resolve dependency tree.
  2. Cause: peer dependency conflict, old package, incompatible React/Angular/Vite plugin version, stale lockfile.
  3. Quick diagnosis:
    node -v
    npm -v
    npm explain package-name
    
  4. Safe fix: align package versions and reinstall.
  5. Cleanup command:
    rm -rf node_modules package-lock.json
    npm install
    

    Add Windows PowerShell equivalent.

  6. Last resort: explain when --legacy-peer-deps is acceptable and what it hides.
  7. Verification: run app tests or npm run build.

Internal links to add:

Ad notes:

Brief 7: Cannot find module in Node.js

Required sections:

  1. Problem: show Error: Cannot find module '...'.
  2. Cause: missing install, wrong file path, wrong working directory, CommonJS/ESM mismatch, package export path.
  3. Quick fix: install missing package or correct relative path.
  4. Commands:
    npm install package-name
    npm ls package-name
    node -p "process.cwd()"
    
  5. Path examples: ./utils/file.js vs utils/file.js.
  6. ESM notes: type: module, file extensions, import vs require.
  7. Verification: rerun the exact Node command or test script.

Internal links to add:

Ad notes:

Brief 8: TypeScript Cannot find name

Required sections:

  1. Problem: include TS2304: Cannot find name.
  2. Cause: missing import, missing type package, wrong lib, wrong types, typo, test environment globals.
  3. Quick fix: import the symbol or install @types/....
  4. Examples:
    npm install -D @types/node
    
    {
      "compilerOptions": {
        "types": ["node"]
      }
    }
    
  5. Browser vs Node globals: document, process, Buffer.
  6. Verification: npx tsc --noEmit.
  7. Common mistakes: adding any, suppressing with // @ts-ignore, editing the wrong tsconfig.

Internal links to add:

Ad notes:

Brief 9: Property does not exist on type

Required sections:

  1. Problem: include TS2339: Property 'x' does not exist on type.
  2. Cause: object type is too narrow, API response type incomplete, union type not narrowed, DOM query result nullable.
  3. Safe fixes: update interface, narrow the union, use optional chaining when appropriate.
  4. Examples:
    type User = { id: number; name: string };
    
    if ("email" in user) {
      console.log(user.email);
    }
    
  5. Explain what not to do: avoid as any as a default answer.
  6. Verification: npx tsc --noEmit.
  7. Related mistakes: confusing runtime object shape with compile-time type.

Internal links to add:

Ad notes:

Brief 10: tsconfig paths not working

Required sections:

  1. Problem: imports like @/components/Button fail.
  2. Cause: missing baseUrl, wrong paths, runtime bundler not configured, test runner not configured, Node does not understand TS paths by itself.
  3. tsconfig example:
    {
      "compilerOptions": {
        "baseUrl": ".",
        "paths": {
          "@/*": ["src/*"]
        }
      }
    }
    
  4. Vite example: mention matching alias in vite.config.ts.
  5. Node runtime: explain tsconfig-paths, bundling, or relative imports.
  6. Verification: npx tsc --noEmit plus app/test command.
  7. Common mistakes: editing tsconfig.json while framework uses tsconfig.app.json.

Internal links to add:

Ad notes: