-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Library Version
1.2.0
React Native Version
0.81.6
React Version
19.1.0
Expo Version
54.0.33
Minimal Reproduction
Steps to reproduce
- Create an Expo 54 app with React Native 0.81 and add
voltra(e.g.^1.2.0). - Configure the Voltra plugin in
app.config.tswith a widget (e.g. bookmarks) and runnpx expo prebuild --platform iosso the LINESLiveActivity target and Podfile block are generated. - Use pnpm as the package manager (so
node_modules/voltrais a symlink into.pnpm). - Run
cd ios && pod install.
Expected behavior
pod install completes and the Live Activity target links against a single VoltraWidget pod source.
Actual behavior
pod install fails with:
[!] There are multiple dependencies with different sources for `VoltraWidget` in `Podfile`:
- VoltraWidget (from `../node_modules/.pnpm/voltra@1.2.0_.../node_modules/voltra/ios`)
- VoltraWidget (from `../node_modules/voltra/ios`)
CocoaPods sees two paths for the same pod because pnpm uses a symlink for node_modules/voltra. If that duplicate is not resolved, the iOS build can also fail with:
error: Unable to find module dependency: 'VoltraWidget'
import VoltraWidget
(in the Live Activity target that uses VoltraWidgetBundle.swift).
Details
- Package manager: pnpm (symlinked
node_modules) - Platform: iOS
The Voltra plugin adds a single pod 'VoltraWidget', :path => podspec_dir_path in the widget extension target. The path is derived from node_modules/voltra/ios; with pnpm that can be resolved as both the symlink path and the real path, so CocoaPods treats them as two different sources.
Suggested fix: In the plugin’s Podfile generation (e.g. plugin/build/ios-widget/podfile.js), canonicalize the path before building the relative path, e.g. in Ruby:
podspec_dir_path = File.realpath(podspec_dir_path) if podspec_dir_path && File.exist?(podspec_dir_path)before:
podspec_dir_path = Pathname.new(podspec_dir_path).relative_path_from(Pathname.new(__dir__)).to_pathWorkaround: An Expo config plugin that runs withPodfile and inserts the File.realpath line into the Voltra-generated block so the generated Podfile uses a single canonical path (e.g. plugins/withVoltraWidgetPodPathFix.js applied after the voltra plugin in app.config.ts).
Additional Information (Optional)
No response