Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Quick Create Missing FileNew to Visual Studio Code? Get it now.
Quick Create Missing File

Quick Create Missing File

Abdul Moiz Jawed

|
2 installs
| (0) | Free
Quick fix to create missing files for unresolved imports (JS/TS). For JS/JSX, enable diagnostics via jsconfig.json — see README.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Quick Create Missing File

Quick fix to create missing files for unresolved imports in JS/TS projects.
Shows a lightbulb/hover action like “Create file for './utils/api'…” that creates folders and the file (e.g., api.ts, api.js, or index.ts in a directory).


Features

  • Detects “Cannot find module …” on relative imports (./ or ../).
  • Offers a Quick Fix to create the file (and parent folders) instantly.
  • Lets you pick the extension if the import has no extension (configurable).

Works out of the box for TypeScript

Just write your imports; when a module is missing, VS Code/TS server produces a diagnostic and the Quick Fix appears.


JavaScript / JSX users (Enable diagnostics)

VS Code only shows Quick Fixes when there’s a diagnostic. For JS/JSX, enable type checking so the “Cannot find module …” diagnostic appears:

{ "compilerOptions": { "checkJs": true, "allowJs": true, "jsx": "react-jsx" }, "include": ["src"] }

Option A — Per file

// @ts-check
import api from './utils/api'
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft