Skip to content

Duplicate TurboModule symbols in iOS build #345

@oussamakh96

Description

@oussamakh96

When building an iOS app with eas build, the build fails due to duplicate TurboModule symbols generated by the codegen process. The issue seems to stem from two files in the library:

RNCompressorSpec.js

RNVideoCompressorSpec.js

Both define a TurboModule with the same native spec name: NativeCompressorSpec.

❌ duplicate symbol 'facebook::react::NativeCompressorSpecJSI::NativeCompressorSpecJSI(...)' in
┌─ libReactCodegen.a66
└─ libReactCodegen.a48

❌ duplicate symbol 'OBJC_METACLASS$_NativeCompressorSpecBase' in
❌ duplicate symbol 'OBJC_CLASS$_NativeCompressorSpecBase' in
...
❌ ld: 5 duplicate symbols

🧪 Steps to Reproduce
Install react-native-compressor in a project using Expo + EAS Build.

Run eas build -p ios

Observe that the build fails with duplicate symbol errors related to NativeCompressorSpec.

✅ Expected Behavior
The build should succeed without TurboModule symbol duplication.

💡 Suggested Fix
Either remove one of the duplicate spec files (likely RNVideoCompressorSpec.js), or

Rename one of the specs so both do not register the same NativeCompressorSpec.

This issue blocks EAS iOS builds unless developers manually patch the library using patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions