I'm trying to fix this error on github - . I cloned the existing repo and ran it and the error was still there. I am currently updating packages to see why this crash keeps happening, but when I try to upgrade to react-native 0.64 from 0.63.4 i get this error in xcode while trying to run on device or simulator:
Projects/ReactNative-FBAds-AdChoicesView-Issue/node_modules/react-native/scripts/../Libraries: No such file or directory
seems like when upgrading to 0.64, the libraries folder is no longer in the scripts folder... Any help would be appreciated. I'm using the same repo as in the link above and then i run npm install -g npm-check-updates
and then ncu -u
and then npm install
and then cd ios & pod install
(update - 0.63.4 also does not have the libraries folder in there.)
I'm trying to fix this error on github - https://github./callstack/react-native-fbads/issues/286 . I cloned the existing repo and ran it and the error was still there. I am currently updating packages to see why this crash keeps happening, but when I try to upgrade to react-native 0.64 from 0.63.4 i get this error in xcode while trying to run on device or simulator:
Projects/ReactNative-FBAds-AdChoicesView-Issue/node_modules/react-native/scripts/../Libraries: No such file or directory
seems like when upgrading to 0.64, the libraries folder is no longer in the scripts folder... Any help would be appreciated. I'm using the same repo as in the link above and then i run npm install -g npm-check-updates
and then ncu -u
and then npm install
and then cd ios & pod install
(update - 0.63.4 also does not have the libraries folder in there.)
Share Improve this question edited Mar 17, 2021 at 18:24 frankied003 asked Mar 17, 2021 at 18:12 frankied003frankied003 5169 silver badges29 bronze badges 2- 1 I am also facing the same exact issue! github./facebook/react-native/issues/31181 – Muhammad Abbas Commented Mar 19, 2021 at 12:49
- same here, started two days ago – Gustavo Reyes Commented Mar 21, 2021 at 15:09
1 Answer
Reset to default 8This happened also to me upgrading from 0.63 to 0.64. After trying all solutions I followed a solution moving the folder to a directory where the path contain no spaces and it works and build the app successfully.
Solution to React Native 0.64 build fail
In order for this to work properly follow these steps:
- If you previously installed a global react-native-cli package, please remove it as it may cause unexpected issues (i.e. npm uninstall -g react-native-cli)
- Move the project folder in a path with no spaces (i.e. ~/sub folder name/ReactNativeApp won't work till you have spaces in the path, so move in a path like ~/folder/ReactNativeApp)
- Then cd into the project folder and upgrade react native to the latest version with npx react-native upgrade and resolve conflicts if any
- After upgrading remove the node_modules folder and the yarn.lock from the root and the podfile.lock and Pods folder from ios subfolder
- Then cd back to the root and run yarn install && npx pod-install
- Now run again your app in Xcode or your IDE and it works
Crazy and absurd that a space in the path-name could cause this issue