Summary: `yarn start` was failing due missing watchman configuration. Adding an empty .watchmanconfig prevents this from happening. Full build failure: ``` ➜ flipper git:(master) yarn start Using globally installed version of Yarn yarn run v1.5.1 (node:95759) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. $ cross-env NODE_ENV=development node scripts/start-dev-server.js ┌──────────────────────────────────────────────────────────────────────────────┐ │ │ │ Running Metro Bundler on port 3001. │ │ │ │ Keep Metro running while developing on any JS projects. Feel free to │ │ close this tab and run your own Metro instance if you prefer. │ │ │ │ https://github.com/facebook/react-native │ │ │ └──────────────────────────────────────────────────────────────────────────────┘ Looking for JS files in /Users/eveliotc/dev/flipper Loading dependency graph...✔ No known errors jest-haste-map: Watchman crawl failed. Retrying once with node crawler. Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project. Error: Watchman error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html. 🕵️ Watching for plugin changes (electron) 'app.makeSingleInstance(cb)' is deprecated. Use 'app.requestSingleInstanceLock() and app.on('second-instance', cb)' instead. DevTools listening on ws://127.0.0.1:9222/devtools/browser/f14faf94-45bb-42b9-a405-f7da2bdbcf28 ⚙️ Compiling sonar-plugin-sandbox... ⚙️ Compiling sonar-plugin-layout... ⚙️ Compiling sonar-plugin-leakcanary... ⚙️ Compiling sonar-plugin-sharedpreferences... ⚙️ Compiling sonar-plugin-network... Looking for JS files in /Users/eveliotc/dev/flipper/src/plugins/sandbox /Users/eveliotc/dev/flipper Looking for JS files in /Users/eveliotc/dev/flipper/src/plugins/layout /Users/eveliotc/dev/flipper Looking for JS files in /Users/eveliotc/dev/flipper/src/plugins/leak_canary /Users/eveliotc/dev/flipper Loading dependency graph...jest-haste-map: Watchman crawl failed. Retrying once with node crawler. Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project. Error: Watchman error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper/src/plugins/sandbox` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html. Looking for JS files in /Users/eveliotc/dev/flipper/src/plugins/shared_preferences /Users/eveliotc/dev/flipper Looking for JS files in /Users/eveliotc/dev/flipper/src/plugins/network /Users/eveliotc/dev/flipper Loading dependency graph...jest-haste-map: Watchman crawl failed. Retrying once with node crawler. Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project. Error: Watchman error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper/src/plugins/leak_canary` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html. jest-haste-map: Watchman crawl failed. Retrying once with node crawler. Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project. Error: Watchman error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper/src/plugins/layout` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html. jest-haste-map: Watchman crawl failed. Retrying once with node crawler. Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project. Error: Watchman error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper/src/plugins/network` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html. events.js:167 throw er; // Unhandled 'error' event ^ Error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project? at BunserBuf.<anonymous> (/Users/eveliotc/dev/flipper/static/node_modules/fb-watchman/index.js:95:23) at BunserBuf.emit (events.js:182:13) at BunserBuf.process (/Users/eveliotc/dev/flipper/static/node_modules/bser/index.js:292:10) at /Users/eveliotc/dev/flipper/static/node_modules/bser/index.js:247:12 at process._tickCallback (internal/process/next_tick.js:61:11) Emitted 'error' event at: at Client.client.on.error (/Users/eveliotc/dev/flipper/static/node_modules/jest-haste-map/build/lib/watchman_watcher.js:96:10) at Client.emit (events.js:182:13) at BunserBuf.<anonymous> (/Users/eveliotc/dev/flipper/static/node_modules/fb-watchman/index.js:107:12) at BunserBuf.emit (events.js:182:13) at /Users/eveliotc/dev/flipper/static/node_modules/bser/index.js:249:12 at process._tickCallback (internal/process/next_tick.js:61:11) jest-haste-map: Watchman crawl failed. Retrying once with node crawler. Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project. Error: Watchman error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper/src/plugins/shared_preferences` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html. error An unexpected error occurred: "Command failed. Exit code: 1 Command: sh Arguments: -c cross-env NODE_ENV=development node scripts/start-dev-server.js Directory: /Users/eveliotc/dev/flipper Output: ". info If you think this is a bug, please open a bug report with the information provided in "/Users/eveliotc/dev/flipper/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` Pull Request resolved: https://github.com/facebook/flipper/pull/265 Reviewed By: jknoxville Differential Revision: D9861602 Pulled By: eveliotc fbshipit-source-id: 8e7f95c5dd3f3332c866e1b156499de97784e4f1
Flipper 
Flipper, formerly Sonar, is currently in the process of being renamed. This may cause some inconsistencies until everything is in place. We apologize for any inconvience caused.
Flipper is a platform for debugging mobile apps on iOS and Android. Visualize, inspect, and control your apps from a simple desktop interface. Use Flipper as is or extend it using the plugin API.
Table of Contents
- Mobile development
- Extending Flipper
- Contributing to Flipper
- In this repo
- Getting started
- Building from Source
Mobile development
Flipper aims to be your number one companion for mobile app development on iOS and Android. Therefore, we provide a bunch of useful tools including a log viewer, interactive layout inspector, and network inspector.
Extending Flipper
Flipper is built as a platform. In addition to using the tools already included, you can create your own plugins to visualize and debug data from your mobile apps. Flipper takes care of sending data back and forth, calling functions, and listening for events on the mobile app.
Contributing to Flipper
Both Flipper's desktop app and native mobile SDKs are open-source and MIT licensed. This enables you to see and understand how we are building plugins, and of course join the community and help improve Flipper. We are excited to see what you will build on this platform.
In this repo
This repository includes all parts of Flipper. This includes:
- Flipper's desktop app built using Electron (
/src) - native Flipper SDKs for iOS (
/iOS) - native Flipper SDKs for Android (
/android) - Plugins:
- Logs (
/src/device-plugins/logs) - Layout inspector (
/src/plugins/layout) - Network inspector (
/src/plugins/network)
- Logs (
- website and documentation (
/website//docs)
Getting started
Please refer to our Getting Started guide to set up Flipper.
Requirements
- macOS (while Flipper is buildable using other systems as well, only macOS is officially supported)
- node >= 8
- yarn >= 1.5
- iOS developer tools (for developing iOS plugins)
- Android SDK and adb
Building from Source
Desktop
Running from source
git clone https://github.com/facebook/flipper.git
cd flipper
yarn
yarn start
NOTE: If you're on Windows, you need to use Yarn 1.5.1 until this issue is resolved.
Building standalone application
yarn build --mac --version $buildNumber
iOS SDK + Sample App
cd iOS/Sample
pod install
open Sample.xcworkspace
<Run app from xcode>
Android SDK + Sample app
Start up an android emulator and run the following in the project root:
./gradlew :sample:installDebug
Documentation
Find the full documentation for this project at fbflipper.com.
Our documentation is built with Docusaurus. You can build it locally by running this:
cd website
yarn
yarn start
Contributing
See the CONTRIBUTING file for how to help out.
License
Flipper is MIT licensed, as found in the LICENSE file.
