最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - No such file or directory react-nativescriptslibraries - Stack Overflow

programmeradmin4浏览0评论

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
Add a ment  | 

1 Answer 1

Reset to default 8

This 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

发布评论

评论列表(0)

  1. 暂无评论