Michal
Michal

Reputation: 5220

react-native run-ios failing after recent updates

This method worked 1 month ago.

running:

react-native run-ios

returns following error:

Scanning 557 folders for symlinks in /home/michal/WebstormProjects/ReactNativeSampleApp/sampleapp/node_modules (2ms)
Found Xcode project sampleapp.xcodeproj

spawnSync xcrun ENOENT

Upvotes: 3

Views: 826

Answers (1)

Michal
Michal

Reputation: 5220

After revisiting this question this is now what I do when react-native fails to build a project on a virtual/real device.

  • Clear derived data rm -rf ~/Library/Developer/Xcode/DerivedData
  • Clear watchman watchman watch-del-all
  • Remove node modules rm -rf node_modules
  • Clean npm cache npm cache clean --force
  • Clean temp directory rm -fr $TMPDIR/react-*
  • Clean ios build product -> clean

Make sure that all libraries are linked: react-native link

  • Install modules npm install
  • Run dev server node node_modules/react-native/local-cli/cli.js start -- --reset-cache (preferably manually from console because xcode does not reset cache)
  • Build the project react-native run-ios

Upvotes: 1

Related Questions