{"action":"created","issue":{"url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/1135","repository_url":"https://api.github.com/repos/facebookincubator/create-react-app","labels_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/1135/labels{/name}","comments_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/1135/comments","events_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/1135/events","html_url":"https://github.com/facebookincubator/create-react-app/issues/1135","id":193053710,"number":1135,"title":"Yarn breaks `npm test` running in watch mode","user":{"login":"zhusee2","id":365035,"avatar_url":"https://avatars.githubusercontent.com/u/365035?v=3","gravatar_id":"","url":"https://api.github.com/users/zhusee2","html_url":"https://github.com/zhusee2","followers_url":"https://api.github.com/users/zhusee2/followers","following_url":"https://api.github.com/users/zhusee2/following{/other_user}","gists_url":"https://api.github.com/users/zhusee2/gists{/gist_id}","starred_url":"https://api.github.com/users/zhusee2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhusee2/subscriptions","organizations_url":"https://api.github.com/users/zhusee2/orgs","repos_url":"https://api.github.com/users/zhusee2/repos","events_url":"https://api.github.com/users/zhusee2/events{/privacy}","received_events_url":"https://api.github.com/users/zhusee2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-02T07:44:38Z","updated_at":"2016-12-02T13:23:53Z","closed_at":null,"body":"I recently tried the script on master which brings Yarn support. However a freshly-created app will fail to run `npm test` if it was installed through Yarn. The watch mode is broken.\r\n\r\nBut if you try to remove the whole `node_modules/` folder then run `npm install`, it'll work perfectly after a long wait. I suggest that Yarn breaks Jest.\r\n\r\n### Can you reproduce the problem with latest npm?\r\nYes.\r\n\r\n### Description\r\n\r\nas above .\r\n\r\n### Expected behavior\r\n\r\nJest should be running in watch mode.\r\n\r\n### Actual behavior\r\n\r\nJest died with some FSEventStreamStart errors.\r\n\r\n### Environment\r\n\r\n* react-scripts@0.7.0  \r\n* Node v6.9.1\r\n* `npm` 3.10.8\r\n* `yarn` 0.17.9\r\n* macOS Sierra 10.12.1\r\n\r\n### Reproducible Demo\r\n\r\n```sh\r\n# Install create-react-app from master\r\nyarn global add github:facebookincubator/create-react-app\r\ncreate-react-app test-app\r\n\r\n# wait for the yarn install to finish\r\nyarn test\r\n```\r\n\r\nThen you'll get:\r\n\r\n```\r\nDetermining test suites to run...2016-12-02 15:15 node[26312] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)\r\n2016-12-02 15:15 node[26312] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)\r\n2016-12-02 15:15 node[26312] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)\r\n2016-12-02 15:15 node[26312] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)\r\nevents.js:160\r\n      throw er; // Unhandled 'error' event\r\n      ^\r\n\r\nError: Error watching file for changes: EMFILE\r\n    at exports._errnoException (util.js:1026:11)\r\n    at FSEvent.FSWatcher._handle.onchange (fs.js:1406:11)\r\nnpm ERR! Test failed.  See above for more details.\r\n```\r\n\r\nBut if you run Jest in CI mode, it'll work:\r\n\r\n```sh\r\n# Disable watch mode\r\nCI=true npm test\r\n\r\n# and it'll pass\r\n> test-app@0.1.0 test ~/test-app\r\n> react-scripts test --env=jsdom\r\n\r\n PASS  src/App.test.js\r\n  ✓ renders without crashing (24ms)\r\n\r\nTest Suites: 1 passed, 1 total\r\nTests:       1 passed, 1 total\r\nSnapshots:   0 total\r\nTime:        1.418s\r\nRan all test suites.\r\n```"},"comment":{"url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/comments/264452896","html_url":"https://github.com/facebookincubator/create-react-app/issues/1135#issuecomment-264452896","issue_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/1135","id":264452896,"user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"created_at":"2016-12-02T13:23:53Z","updated_at":"2016-12-02T13:23:53Z","body":"We don't support installing CRA from GitHub. Can you reproduce this issue by cloning the repo?"}}
{"actor":{"display_login":"gaearon"}}