The Silent Killer of Micro-Frontends: Dependency Hell 2.0
Remember when dependency management was just about updating your package.json and hoping for the best? Those were simpler times.
Last week, I watched a senior engineer spend two hours trying to figure out why their perfectly working micro-frontend suddenly started throwing runtime errors in production. The culprit? Another team had updated their shared authentication module. The real kicker? Both teams were following their dependency management best practices. While we're still in development, we wanted to share what we've learned about MFE dependency management and some immediate solutions you can implement today. Consider this post your survival guide while we build something better.
Welcome to dependency hell 2.0: The micro-frontend edition.
The "It Works on My MFE" Problem
Here's a fun fact: In our survey of 100+ micro-frontend teams, "unexpected dependency conflicts" ranked as the #1 cause of production issues. Above deployment failures. Above runtime errors. Above that one intern who pushed directly to main (you know who you are).
The typical scenario goes something like this:
// Team A's package.json
{
"dependencies": {
"shared-auth": "^2.0.0",
"shared-utils": "^1.5.0"
}
}
// Team B's package.json
{
"dependencies": {
"shared-auth": "^2.1.0",
// Seems fine, right?
}
}
// Narrator: It was not fine.
Both teams followed semver. Both had clean builds. Both had passing tests. Yet somehow, in production, everything broke because Team B's update included a change to a shared context that Team A relied on.
"But we didn't change the API!" is the modern equivalent of "But it works on my machine!"
The Hidden Cost of "Independent" Teams
Here's what the micro-frontend architecture diagrams don't show you:
- The 3 AM Slack message: "Did anyone deploy anything? The header is missing in prod."
- The endless Chrome DevTools sessions trying to figure out which version of what module is actually loading
- The growing spreadsheet of "DO NOT UPDATE THESE PACKAGES" that nobody reads
- The weekly "dependency sync" meetings that somehow keep getting longer
One engineering manager told us they maintain a hand-drawn diagram of their MFE dependencies on a whiteboard. They update it with dry-erase markers. In 2024. At a publicly traded company.
We're not judging. We've all been there.
The Real Problem Isn't Technical
Hot take: This isn't actually a dependency management problem. It's a visibility problem.
Think about it:
- Your build tools can detect dependency conflicts
- Your package manager can resolve versions
- Your tests can catch breaking changes
But only if they have the full picture. And with micro-frontends, nobody has the full picture.
Team A doesn't know that Team B's "minor update" changes behavior they rely on. Team B doesn't know that Team C depends on the exact behavior they just changed. And Team C... well, Team C is still trying to figure out why their local environment stopped working after lunch.
So What's the Solution?
First, let's acknowledge what doesn't work:
- ❌ Strict version pinning (goodbye, security updates)
- ❌ Mandatory team code reviews (goodbye, team autonomy)
- ❌ Mono-repo everything (goodbye, independent deployment)
- ❌ "Just communicate better" (goodbye, productivity)
Instead, we need:
- Real-time dependency graph visualization
- Automated impact analysis for updates
- Proactive conflict detection
- Cross-team visibility by default
This is exactly why we built dependency tracking into FrontendFleet from day one. Not because dependency management is a new problem, but because micro-frontends make it everyone's problem.
Why Basic Solutions Aren't Enough
Let's look at how teams typically try to solve MFE dependency management, why these approaches help but ultimately fall short, and what a complete solution looks like.
1. DIY Dependency Tracking
Many teams start with a simple dependency tracker:
// dependencies-tracker.ts
interface MFEDependency {
source: string;
target: string;
version: string;
lastUpdated: Date;
}
// Basic tracking implementation
class DependencyTracker {
private deps: Map<string, MFEDependency[]> = new Map();
addDependency(dep: MFEDependency) {
const existing = this.deps.get(dep.source) || [];
this.deps.set(dep.source, [...existing, dep]);
}
}
✅ What this solves:
- Basic dependency documentation
- Simple version tracking
- Manual update logging
❌ What's still missing:
- Real-time dependency changes
- Automatic impact analysis
- Cross-team visibility
- Breaking change detection
- Deployment coordination
2. The Spreadsheet Approach
Many teams maintain a shared document:
MFE Name, Version, Dependencies, Owner, Last Updated
auth-mfe, 2.1.0, shared-utils@1.x, Team A, 2024-03-15
checkout-mfe, 1.5.0, auth-mfe@2.x, Team B, 2024-03-14
✅ What this solves:
- Basic version tracking
- Team ownership clarity
- Update history
❌ What's still missing:
- Real-time accuracy
- Automated updates
- Dependency validation
- Impact analysis
- Deployment coordination
3. Runtime Validation Scripts
Some teams implement basic runtime checks:
// dependency-validator.js
const validateDependencies = () => {
const loadedModules = window.__MFE_REGISTRY__ || {};
return Object.entries(loadedModules).map(([name, version]) => {
const expected = getExpectedVersion(name);
return semver.satisfies(version, expected);
});
};
✅ What this solves:
- Basic version compatibility checks
- Runtime error prevention
- Simple validation
❌ What's still missing:
- Proactive conflict detection
- Cross-environment validation
- Impact analysis
- Team notifications
- Deployment orchestration
The Reality Check
While these solutions help, they share common limitations:
- Manual Updates Required
- Someone needs to maintain the documentation
- Updates are often forgotten or delayed
- Human error is inevitable
- No Real-time Visibility
- Changes aren't reflected immediately
- Teams work with outdated information
- Issues discovered too late
- Missing Impact Analysis
- Can't predict breaking changes
- No automatic detection
- Manual investigation required
- Limited Coordination
- No automated notifications
- Manual deployment coordination
- Reactive rather than proactive
A Better Way Forward
While building FrontendFleet, we're exploring what the ideal solution looks like. Here's what we're working on:
- Automatic Dependency Discovery
- Real-time dependency graph updates
- Automatic version tracking
- Cross-repo analysis
- Proactive Impact Analysis
- Breaking change detection
- Affected MFE identification
- Deployment risk assessment
- Team Coordination
- Automated notifications
- Deployment orchestration
- Cross-team visibility
- Real-time Monitoring
- Version compatibility checks
- Runtime dependency validation
- Performance impact tracking
Getting Started
While building a complete solution takes time, here are some steps you can take today:
- Map Your Current State
- Document existing MFEs
- Track critical dependencies
- Identify team ownership
- Establish Update Protocols
- Create version update process
- Define communication channels
- Set up basic monitoring
- Implement Basic Checks
- Add version validation
- Set up build-time checks
- Create update notifications
What's Next?
Whether you're just starting with micro-frontends or scaling an existing architecture, dependency management needs to evolve with your team.
We're building FrontendFleet to automate these processes and provide the real-time visibility teams need, going beyond basic tracking to offer complete dependency lifecycle management.
Want to be the first to know when we launch?
We're launching soon and spots for early access will be limited.
You'll get:
- Early access to FrontendFleet
- Weekly insights on MFE architecture
- Exclusive access to our dependency management templates
- Behind-the-scenes of building a modern MFE tool
P.S. Got a dependency horror story or a clever solution? Share it with us at founders@frontendfleet.com - we're talking to teams about their MFE challenges while building FrontendFleet, and we'd love to hear your perspective! 😄
P.P.S. Yes, we tried the spreadsheet approach too. Our spreadsheet got so complex it probably qualified as a database. A very unreliable database. We're building something better - join the waitlist to see what's coming.