🧰 Safe Packages Installation
🧭 A VS Code extension that makes dependency installation safer, faster and smarter.
Auto-detects your package manager, cleans your project, auto-installs missing managers, switches Node versions, and installs packages with fallback & retry logic 🚀
🚀 Features
- 🧭 Auto-detect your current package manager (Yarn / NPM / PNPM / Bun)
- 📦 Auto-install missing Yarn or PNPM
- 🧹 Automatically clean old lock files and
node_modules
- 🪄 Auto Node version switching with NVM
- 🔁 Smart fallback between managers (Yarn → NPM → PNPM)
- 🧠 Intelligent Yarn lockfile regeneration when corrupted
- 🌐 Handles network timeouts with retry logic
- 📊 Real-time progress notifications inside VS Code
- 🧰 Runs fully automated — no manual steps needed
🛠 Why This Extension?
Tired of:
- ❌ Engine mismatch errors (Node version not supported)
- 🔒 EPERM file lock errors
- 💥 Corrupted yarn.lock files
- ⏳ Hanging installs without feedback
This extension fixes all of that in one command.
It auto-installs the right tools and runs the safest flow possible.
📦 Installation
🏪 From Marketplace
- Open VS Code
- Search for
Safe Packages Installation
in the Extensions panel
- Click Install
🧰 Manual Installation
vsce package
code --install-extension safe-packages-installation-0.0.1.vsix
---
## ⚡ Quick Start
### 1. Open your project in VS Code
```plaintext
cd your-project
code .
2. Run the command in the Command Palette
Ctrl + Shift + P → Safe Packages Installation: Safe Install Dependencies
3. Watch the magic 🪄
- Detects package manager (Yarn / NPM / PNPM / Bun)
- Cleans node_modules & lock files
- Switches Node version automatically if needed
- Installs dependencies with intelligent fallback
✅ No more broken installs or engine errors.
🧠 Supported Package Managers
Manager |
Support Level |
Notes |
🟡 Yarn |
✅ Full Support |
Lockfile auto-regeneration supported |
🟢 PNPM |
✅ Full Support |
Recommended for performance |
🔴 NPM |
✅ Full Support |
Standard fallback |
🟠 Bun |
🧪 Experimental |
Basic install flow |
🧱 Example Flow
Step |
Action |
1 |
Detect Yarn.lock |
2 |
Remove node_modules |
3 |
Run Yarn install |
4 |
If error: Switch Node version |
5 |
Retry install |
6 |
If still error: Fallback to NPM |
7 |
✅ Done |
🪄 Node Version Auto Switch
If your project has incompatible engine requirements:
error @achrinza/node-ipc@9.2.2: The engine "node" is incompatible with this module.
Expected version "8 || 10 || 12 || 14 || 16 || 17". Got "18.20.4"
The extension will:
- 🔄 Auto switch to Node 16 (or the required version)
- ⏳ Wait for confirmation that the version changed
- 🚀 Resume installation automatically
🛠 Commands
Command |
Description |
Safe Packages Installation: Safe Install Dependencies |
Detects your setup and runs a clean, smart, secure install flow |
🧾 Changelog
v0.0.1
- 🧭 Auto-detect package manager
- 🧹 Project cleanup before installation
- 🪄 Auto Node switch
- 🔁 Smart fallback between managers
- 🧠 Yarn lockfile recovery
- 🌐 Network timeout handling
- 📊 Installation progress notifications
👨💻 Author
Kerolos Zakaria
Portfolio • GitHub • Marketplace • LinkedIn
📝 License
MIT © 2025 Kerolos Zakaria