Skip to content

Conversation

@stuburger
Copy link
Contributor

Fix: Add Explicit Dependencies for Admin Interface Packages

Problem

Our build process breaks because the admin interface imports packages that aren't explicitly declared in apps/backend/package.json. These dependencies were only available through a transitive dependency chain:

This creates TypeScript errors and potential build failures when the dependency chain changes.

Solution

Added explicit dependencies using the exact versions already resolved by Yarn:

{
  "dependencies": {
    "@dnd-kit/core": "^6.3.1",
    "@dnd-kit/sortable": "^8.0.0", 
    "@dnd-kit/utilities": "^3.2.2",
    "@tanstack/react-query": "5.64.2",
    "cmdk": "^0.2.1",
    "react-router-dom": "6.20.1"
  }
}

These packages are actively used throughout the admin interface (31+ files) for:

  • API state management (@tanstack/react-query)
  • Drag-and-drop functionality (@dnd-kit/*)
  • Command palette (cmdk)
  • Admin routing (react-router-dom)

Additional Changes

Added apps/backend/public to .gitignore - this symlink is created during the build process.

Impact

  • ✅ Fixes build process issues
  • ✅ No breaking changes (same versions as before)
  • ✅ Explicit dependency management
  • ✅ Prevents future build failures from upstream changes

Add explicit dependencies for packages that were previously available only
through transitive dependencies from @medusajs/dashboard:

- @tanstack/react-query@5.64.2
- @dnd-kit/core@^6.3.1
- @dnd-kit/sortable@^8.0.0
- @dnd-kit/utilities@^3.2.2
- cmdk@^0.2.1
- react-router-dom@6.20.1

These packages are actively used in the admin interface but were not
explicitly declared, creating a risk of breakage if upstream dependencies
change. This change improves dependency transparency and stability.
Add apps/backend/public to .gitignore as it's a symlink automatically
created during the build process pointing to .medusa/server/public/
@hexrw
Copy link

hexrw commented Sep 4, 2025

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants