-
Notifications
You must be signed in to change notification settings - Fork 2
Debugging common errors
Michael Lai edited this page Mar 27, 2016
·
4 revisions
Most errors with building can be fixed with all or some subset of the following:
-
npm install
and restarting the packager- Should be done after pulling in new commits that have changed
package.json
- Should be done after pulling in new commits that have changed
-
git clean -dfx -e config
and thennpm install
-
git clean
removes files. Rungit clean -dfx -e config --dry-run
to see what files will be changed without actually performing any of the changes. - Sometimes
npm install
on its own is insufficient to correct dependency issues, or sometimes there are residual generated files that are in.gitignore
that need to be cleaned up. - Can be done to fix non-application-level errors that may occur in the app or in xcode.
-
- Installing watchman
- There will typically be an error inside of the app that will say something about not being able to run watchman.
- If watchman was already installed, then
watchman watch-del-all
- Can be done to fix packager dependency resolution errors.
- (warning: type this in correctly, and make sure it's not deleting anything else important)
rm -rf $TMPDIR/react-native-packager-*
- Can also be done to fix packager dependency resolution errors.
- In Xcode, running Product -> Clean (shift-cmd-k).
- Can fix errors with internal errors resolving internal React functions that arise when building in Xcode.