question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RCT-Folly/folly/portability/Time.h:52:17: typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')

See original GitHub issue

Description

Some days ago with my team we’ve decided to upgrade to RN 0.66.1

After that, I never again can run the project in device or simulator.

I always got the same error:

~/AwesomeProject/ios/Pods/Headers/Private/RCT-Folly/folly/portability/Time.h:52:17:` typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum `clockid_t')

But the strange situation is the rest of my team can run and build for device and simulator.

I tried EVERYTHING. Even reinstall Xcode, full cache clean, and all the possible solutions that I’ve found on web.

The last thing I’m thinking of is reinstall macOS and setup my environment from zero.

Version

0.66.1

Output of react-native info

System: OS: macOS 11.6 CPU: (8) x64 Intel® Core™ i7-6700HQ CPU @ 2.60GHz Memory: 83.00 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 17.0.1 - /var/folders/xg/t7smqnln18bgm1n6f4svxlph0000gn/T/yarn–1635338087075-0.4760779983126484/node Yarn: 1.22.17 - /var/folders/xg/t7smqnln18bgm1n6f4svxlph0000gn/T/yarn–1635338087075-0.4760779983126484/yarn npm: 8.1.0 - /usr/local/bin/npm Watchman: 2021.10.18.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0 Android SDK: Not Found IDEs: Android Studio: 4.1 AI-201.8743.12.41.7199119 Xcode: 13.1/13A1030d - /usr/bin/xcodebuild Languages: Java: 11.0.11 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.66.1 => 0.66.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

  1. I created a new RN project (following https://reactnative.dev).
  2. I run react-native run-ios.
  3. I got always the same error.
~/AwesomeProject/ios/Pods/Headers/Private/RCT-Folly/folly/portability/Time.h:52:17:` typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum `clockid_t')

Snack, code example, screenshot, or link to a repository

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:5
  • Comments:19

github_iconTop GitHub Comments

2reactions
namndcommented, Nov 12, 2021

Thanks @nataly87s , removing that line 52 in Time.h works for me.

sed -i '' 's/typedef uint8_t clockid_t;//' "${SRCROOT}/Pods/RCT-Folly/folly/portability/Time.h"
1reaction
astrahovcommented, May 23, 2022

I found the pattern of this error! It’s all about the path to the project.

// Init clear RN (0.68.2) project ...

/Volumes/development/sandbox/new folder/AwecomeProject/... Error!
/Volumes/development/sandbox/rn-0-68-2/AwecomeProject/... No Error, run successful

The error occurs when there are spaces in the path to the project!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typedef redefinition with different types ('uint8_t' (aka ... - GitHub
Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t') when building latest react-native rc with macOS target #834.
Read more >
React Native Build Error on IOS - typedef redefinition with ...
React Native Build Error on IOS - typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t') · Ask Question.
Read more >
RN Typedef redefinition with different types ('uint8_t' (aka ...
RN Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t') · Issue · Solution 1 · Solution 2.
Read more >
! Typedef redefinition with differ… | Apple Developer Forums
Typedef redefinition with different types ('SCNetworkConnectionFlags' (aka 'unsigned int') vs 'enum SCNetworkReachabilityFlage').
Read more >
invalid conversion from 'uint8_t {aka unsigned char ... - YouTube
invalid conversion from ' uint8_t { aka unsigned char }' to 'MD_MAX72XX::moduleType_t' [-fpermissive]This is the most common error which people ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found