Commit Graph

2 Commits

Author SHA1 Message Date
Pascal Hartig
40a76d5c00 Make .watchmanconfig templates valid JSON
Summary: Otherwise, this causes errors as soon as you add custom plugin paths.

Reviewed By: jknoxville

Differential Revision: D16666507

fbshipit-source-id: 1dca599854ebc48f1f3cb7fe0e01f717648b36d5
2019-08-06 15:17:39 -07:00
Evelio Tarazona Caceres
47ec499973 Add .watchmanconfig to fix yarn start (#265)
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
2018-09-17 10:12:18 -07:00