Skip to content

build(mobile): migrate from npm to pnpm - #46

Merged
Bitstachio merged 5 commits into
mainfrom
chore/migrate-npm-to-pnpm
Sep 3, 2026
Merged

Bitstachio merged 5 commits into
mainfrom
chore/migrate-npm-to-pnpm

Conversation

@Bitstachio

Copy link
Copy Markdown
Owner

No description provided.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

API unit-test coverage

Metric Coverage
Statements 67.47% (610/904)
Branches 49.22% (253/514)
Functions 71.97% (113/157)
Lines 65.84% (534/811)

Unit suite only; controllers are exercised by the e2e suite.

@Bitstachio
Bitstachio requested a review from amir01mn September 2, 2026 23:44
Comment thread mobile/docs/pnpm-migration.md

@amir01mn amir01mn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local migration testing notes

I tested the migration locally on macOS and needed the following additional steps.

1. Install pnpm without Corepack

corepack was unavailable in my Node installation, so I installed the required pnpm version using npm:

npm install -g pnpm@11.25.0
pnpm --version

2. Perform a clean pnpm install

After switching to chore/migrate-npm-to-pnpm:

cd mobile
rm -rf node_modules
rm -f package-lock.json
pnpm install

The install completed successfully, including the approved post-install scripts for browser-tabs-lock and unrs-resolver.

3. Regenerate the iOS pods

cd ios
rm -rf Pods Podfile.lock build
pod install

The initial pod install failed because CocoaPods could not find the required Auth0 pod version (Auth0 2.24.1).

Refreshing the CocoaPods repositories resolved the issue:

pod install --repo-update

After that, the pods installed successfully.

Suggested documentation improvements

  • Show the version-specific fallback when Corepack is unavailable:

    npm install -g pnpm@11.25.0
  • Emphasize that pod install --repo-update may be required when the local CocoaPods repository does not contain the expected Auth0 version.

@MehrshadFb

MehrshadFb commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

@Bitstachio @amir01mn Since this swaps npm for pnpm, let's not merge until the mobile app has been verified on both a simulator/emulator and a physical device.

pnpm's symlinked node_modules layout doesn't behave like npm's flat tree, so the risky spots are Metro's module resolution, RN autolinking, and anything that reaches into node_modules by relative path. A green simulator build on a warm machine doesn't tell us much on its own:

  • Fresh clone + pnpm install (no leftover node_modules, no package-lock.json)
  • iOS: pod install succeeds, app runs on a simulator and a real device
  • Android: Gradle sync/build succeeds, app runs on an emulator and a real device
  • Native modules actually load at runtime — open the screens that use them, don't just check that it builds
  • Release build, not only debug (Hermes/Metro config problems usually surface here first)
  • package-lock.json removed, pnpm-lock.yaml committed
  • CI install + cache steps updated for pnpm
  • If node-linker=hoisted was needed in .npmrc, flag it here so we're treating it as a known workaround rather than the end state

Drop a note with the device and OS versions you tested on.

@Bitstachio
Bitstachio dismissed amir01mn’s stale review September 3, 2026 14:16

Sounds good. I think since the issue with pod install is not directly for the migration (it's tied to iOS setup), we can keep the current documentation. We'll make a separate guide in the future to build and run native Android and iOS apps.

@Bitstachio

Copy link
Copy Markdown
Owner Author

@Bitstachio @amir01mn Since this swaps npm for pnpm, let's not merge until the mobile app has been verified on both a simulator/emulator and a physical device.

pnpm's symlinked node_modules layout doesn't behave like npm's flat tree, so the risky spots are Metro's module resolution, RN autolinking, and anything that reaches into node_modules by relative path. A green simulator build on a warm machine doesn't tell us much on its own:

  • Fresh clone + pnpm install (no leftover node_modules, no package-lock.json)
  • iOS: pod install succeeds, app runs on a simulator and a real device
  • Android: Gradle sync/build succeeds, app runs on an emulator and a real device
  • Native modules actually load at runtime — open the screens that use them, don't just check that it builds
  • Release build, not only debug (Hermes/Metro config problems usually surface here first)
  • package-lock.json removed, pnpm-lock.yaml committed
  • CI install + cache steps updated for pnpm
  • If node-linker=hoisted was needed in .npmrc, flag it here so we're treating it as a known workaround rather than the end state

Drop a note with the device and OS versions you tested on.

I'll skip for now. Because we need to set up new dependencies (Nativewind, testing stack, etc.), the more we wait, the trickier migration might get. For now, I have tested and it works with an iOS emulator. We will do a more thorough smoke test once we set up the main frontend libraries and packages.

@Bitstachio Bitstachio changed the title chore(mobile): migrate from npm to pnpm build(mobile): migrate from npm to pnpm Sep 3, 2026
@Bitstachio
Bitstachio merged commit ba7b996 into main Sep 3, 2026
4 checks passed
@Bitstachio
Bitstachio deleted the chore/migrate-npm-to-pnpm branch September 3, 2026 14:27
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.

3 participants