Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Lazy Install - Auto Install Missing PackagesNew to Visual Studio Code? Get it now.
Lazy Install - Auto Install Missing Packages

Lazy Install - Auto Install Missing Packages

simonhe

|
278 installs
| (0) | Free
| Sponsor
VS Code extension that detects missing npm packages from import statements and installs them with one click using npm, pnpm, yarn, or ni.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Lazy Install

🚀 Lazy Install

VS Code extension to auto install missing npm packages from import statements

Visual Studio Marketplace Version Visual Studio Marketplace Downloads GitHub License

English | 简体中文

Lazy Install detects missing dependencies in JavaScript, TypeScript, React, and Vue files, then lets you install them with one click via npm, pnpm, yarn, or ni.


✨ Why Lazy Install for VS Code?

Stop the tedious workflow! 🛑

❌ Before: Import → Copy package name → Switch to terminal → Type install command → Wait → Switch back to editor ✅ After: Import → Click install button → Done! 🎉

Lazy Install automatically detects uninstalled packages in import, export from, require(), and import() statements, then provides one-click install buttons directly in the editor. No more terminal switching or copy-pasting package names.

🎯 Features

  • 🔍 Missing Package Detection: Automatically scans import statements for dependencies that are not installed yet
  • ⚡ One-Click Install: Install npm packages instantly with inline CodeLens actions
  • 🛠️ Multiple Package Managers: Supports npm, pnpm, yarn, and ni
  • 🧩 Common Import Forms: Supports import, export from, require(), and import()
  • 📦 Dev Dependencies: Choose between regular dependencies and dev dependencies
  • 🔧 Monorepo Support: Works with pnpm workspaces and package.json workspaces
  • 🚀 Zero Configuration: Works out of the box for JavaScript, TypeScript, React, and Vue projects

Just import and click - it's that simple!

🚀 Quick Start

  1. Install the extension from VS Code Marketplace
  2. Write a missing import such as import axios from 'axios'
  3. Click the inline install button above the import
  4. Done! The missing dependency is installed and ready to use

⚙️ Configuration

Customize your package manager in VS Code settings:

{
  "lazy-install.way": "pnpm" // Options: "ni", "npm", "pnpm", "yarn"
}

Supported Package Managers:

  • 🔧 ni (default) - Universal package manager
  • 📦 npm - Node Package Manager
  • ⚡ pnpm - Fast, disk space efficient
  • 🧶 yarn - Reliable, secure, fast

🛠️ Supported Languages

  • ✅ JavaScript (.js)
  • ✅ TypeScript (.ts)
  • ✅ React (.jsx, .tsx)
  • ✅ Vue (.vue)

💡 Pro Tips

  • Regular Dependency: Click the package name button
  • Dev Dependency: Click the "package-name -D" button
  • Common Import Styles: Works with import, require(), and import()
  • Monorepos: Detects pnpm workspaces and package.json workspaces

❓ FAQ

Does Lazy Install work with monorepos?

Yes. It detects pnpm workspaces and package.json workspaces, then installs dependencies in the current package instead of always using the repository root.

Which import styles are supported?

Lazy Install detects packages referenced by import, export from, require(), and import() syntax in supported files.

Can I install dev dependencies?

Yes. Each missing package gets both a regular install action and a -D install action in the CodeLens UI.

🤝 Contributing

Contributions are welcome! Feel free to:

  • 🐛 Report bugs
  • 💡 Suggest features
  • 🔧 Submit pull requests
  • ⭐ Star the project

📄 License

MIT © Simon He

☕ Support

If this extension saves you time, consider buying me a coffee! ☕

Sponsor

🙏 Sponsors


Made with ❤️ by Simon He

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft