Urgent.News

What's breaking now, across thousands of outlets.

Tech

Why we moved our Backstage platform from Yarn to pnpm

What Git worktrees, parallel coding agents, and a cache pointing at the wrong directory taught us about the assumptions hiding inside node_modules . I’m a developer at bol, where we have been building and running our internal developer platform on Backstage for more than five years. After that much time, a Backstage platform becomes more than a collection of plugins. It accumulates its own ways…

Bol, a company utilizing the Backstage platform for five years, decided to switch their internal developer platform from Yarn to pnpm. The move aimed to improve parallel development using Git worktrees and enhance the package manager's efficiency. However, the migration turned out to be more complex than anticipated.

During the switch, CI runs revealed significant issues with the package manager's cache. The cache was writing to the wrong location in GitLab, causing each job to start from scratch. The solution was to set the correct cache location explicitly in the CI configuration, ensuring jobs could reuse the store effectively.

Another challenge arose when pnpm's archive grew to 1.42 GB due to cached node_modules trees. This cache was not providing the expected performance benefits as it still rebuilt dependency layouts and native modules. By removing node_modules from the cache paths, the archive size reduced by 72% and file count by 59%, saving approximately six minutes per pipeline.

Moving to pnpm also posed challenges to the custom worktree machinery used for local development. The existing symlinking logic became incompatible with pnpm's virtual store and links, leading to ENOTDIR failures. To resolve this, the custom logic was removed, and the process was simplified to a single command: pnpm install --frozen-lockfile. This change allowed each checkout to get its own installation while still benefiting from the shared store.

In conclusion, the migration from Yarn to pnpm presented several challenges, including cache misconfiguration and compatibility issues with the custom worktree machinery. By addressing these issues and optimizing the configuration, the company successfully transitioned to the new package manager, achieving better performance and a more efficient development workflow.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Why Static Mock APIs Aren't Enough for Modern Frontend Development

Every frontend developer has experienced this sequence: You start building an interactive web application. The backend is not yet ready, so you connect to a popular free mock API like JSONPlaceholder…

  • Static mock servers provide stateless echo responses.
  • Modern frontend development faces issues with static mocks.
  • Stateful session-based mocks preserve mutations across requests.

I Ship Mobile Apps for $0: Vercel + Render + Supabase Free Tier

TL;DR: My entire mobile stack costs $0 a month. Expo builds the app. Supabase holds data and auth. Render runs background jobs. Vercel hosts the landing page. Free tiers cover all of it.

  • Ship mobile app using Expo for app building and OTA updates
  • Host landing page on Vercel with 100GB bandwidth and SSL
  • Manage data and authentication with Supabase free tier

More from Saturday 12 September →