'react/utils/fnv1a.h' file not found
Hello,
When I try to build my app with Xcode, I get the following error: 'react/utils/fnv1a.h' file not found in the PropsMacros.h file.
I installed the pods with the following command: RCT_NEW_ARCH_ENABLED=1 bundle exec pod install. the issue seems to be only related to the iOS.
Here are my specs:
System:
OS: macOS 14.2.1
CPU: (8) arm64 Apple M2
Memory: 405.19 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.11.0
path: ~/.nvm/versions/node/v20.11.0/bin/node
Yarn:
version: 4.1.1
path: /opt/homebrew/bin/yarn
npm:
version: 10.2.4
path: ~/.nvm/versions/node/v20.11.0/bin/npm
Watchman:
version: 2024.04.22.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK: Not Found
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11076708
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 21.0.1
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.0
wanted: 0.74.0
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: true
Steps the Reproduce
- open up a command line and run:
npx react-native@latest init hole-view-test - then cd into that project and run
bundle install - then run
yarn add react-native-hole-view - then
cd ios - then run
RCT_NEW_ARCH_ENABLED=1 bundle exec pod install - finally
cd ..and runyarn ios
This steps will produce an error. Is there any way that I can solve this?
@ustuncem did you solve this?
@arys No, I ended up downgrading to 0.73.7, I also use react-native-vision-camera and its also not ready for v0.74 so we have to wait or try to solve it. I tried to solve it in Xcode but I dont have a lot of time on my hand
@ustuncem got it, thanks for reply
@ustuncem, I am getting this issue in my RN 0.76.3 version. Is there any solution for it?
I haven't tested it in the New Arch sadly :( that project is now in control of another team and I am really busy currently to try and fix it. @nil-kombee you can try the alpha releases, possibly the version 4 may fix your problem for the new arch
Any updates about this? @ustuncem
I am facing the same issue, any solution of this?
+1
I fixed this by bumping the package version
this is what I did. remove the lib and wrote this:
import React from 'react';
import {View, StyleSheet, Dimensions} from 'react-native';
import Svg, {Defs, Mask, Rect} from 'react-native-svg';
import { scanningHoleY } from '../config';
interface HoleViewProps {
holeWidth: number;
holeHeight: number;
backgroundColor?: string;
borderRadius?: number;
}
const HoleView: React.FC<HoleViewProps> = ({
holeWidth,
holeHeight,
backgroundColor = 'rgba(0, 0, 0, 0.5)',
borderRadius = 16,
}) => {
const {width: screenWidth, height: screenHeight} = Dimensions.get('window');
const holeX = (screenWidth - holeWidth) / 2;
const topSpace = scanningHoleY;
return (
<View style={styles.holeView} >
<Svg height={screenHeight} width={screenWidth} style={StyleSheet.absoluteFill}>
<Defs>
<Mask id="mask" x="0" y="0" height={screenHeight} width={screenWidth}>
<Rect
x="0"
y="0"
width={screenWidth}
height={screenHeight}
fill="white"
/>
<Rect
x={holeX}
y={topSpace}
width={holeWidth}
height={holeHeight}
rx={borderRadius}
ry={borderRadius}
fill="black"
/>
</Mask>
</Defs>
<Rect
x="0"
y="0"
width={screenWidth}
height={screenHeight}
fill={backgroundColor}
mask="url(#mask)"
/>
</Svg>
</View>
);
};
const styles = StyleSheet.create({
holeView: {
position: 'absolute',
width: '100%',
height: '100%',
zIndex: 0,
},
});
export default HoleView;