{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/create-react-app/issues/4167","repository_url":"https://api.github.com/repos/facebook/create-react-app","labels_url":"https://api.github.com/repos/facebook/create-react-app/issues/4167/labels{/name}","comments_url":"https://api.github.com/repos/facebook/create-react-app/issues/4167/comments","events_url":"https://api.github.com/repos/facebook/create-react-app/issues/4167/events","html_url":"https://github.com/facebook/create-react-app/issues/4167","id":306058616,"node_id":"MDU6SXNzdWUzMDYwNTg2MTY=","number":4167,"title":"verifyPackageTree() errors when wrong version dependency is installed in any parent directory","user":{"login":"newoga","id":344018,"node_id":"MDQ6VXNlcjM0NDAxOA==","avatar_url":"https://avatars2.githubusercontent.com/u/344018?v=4","gravatar_id":"","url":"https://api.github.com/users/newoga","html_url":"https://github.com/newoga","followers_url":"https://api.github.com/users/newoga/followers","following_url":"https://api.github.com/users/newoga/following{/other_user}","gists_url":"https://api.github.com/users/newoga/gists{/gist_id}","starred_url":"https://api.github.com/users/newoga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newoga/subscriptions","organizations_url":"https://api.github.com/users/newoga/orgs","repos_url":"https://api.github.com/users/newoga/repos","events_url":"https://api.github.com/users/newoga/events{/privacy}","received_events_url":"https://api.github.com/users/newoga/received_events","type":"User","site_admin":false},"labels":[{"id":809349309,"node_id":"MDU6TGFiZWw4MDkzNDkzMDk=","url":"https://api.github.com/repos/facebook/create-react-app/labels/tag:%20needs%20investigation","name":"tag: needs investigation","color":"d106e8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-03-16T19:59:08Z","updated_at":"2018-12-21T06:47:24Z","closed_at":null,"author_association":"NONE","body":"### Is this a bug report?\r\n\r\nYes\r\n\r\n### Did you try recovering your dependencies?\r\n\r\nNo. This issue presents an argument that there may be a bug in the [verifyPackageTree.js](https://github.com/facebook/create-react-app/blob/next/packages/react-scripts/scripts/utils/verifyPackageTree.js) logic added in the `next` branch. \r\n\r\n### Which terms did you search for in User Guide?\r\n\r\n`version`, `dependenc`. This does not appear to be documented (and since it is internal, maybe it shouldn't be). There is discussion regarding documenting some of the packages related to this in issue in issue #4137 (suggested by @Timer [here](https://github.com/facebook/create-react-app/issues/4137#issuecomment-372003393)).\r\n\r\n### Environment\r\n\r\n```bash\r\n$ node -v\r\nv8.9.4\r\n\r\n$ npm -v\r\n5.7.1\r\n\r\n$ yarn --version\r\n1.5.1\r\n\r\n```\r\nRunning on macOS `10.13.2`. \r\n\r\n### Steps to Reproduce\r\n\r\nI created a reproduction project here: https://github.com/newoga/create-react-app-issue-4167\r\n\r\nThe project is a simple node package that depends on a version of `jest` that is incompatible with `create-react-app@2.0.0-next.47d2d941`. The project also contains a directory (`cra-app`) that was generated by `create-react-app`. The `react-scripts` dependency in that sub-project has been updated to `2.0.0-next.47d2d941`.\r\n\r\n1. `git clone https://github.com/newoga/create-react-app-issue-4167`\r\n2. `cd create-react-app-issue-4167`\r\n3.  `yarn`\r\n4. `yarn run`\r\n\r\n### Expected Behavior\r\n\r\nFrom a user perspective, the `yarn run` command should not error and the application should start. The user did not manually install an incompatible version of `jest` in the `create-react-app` generated project. The version of `jest` in the generated project's `node_modules` is the correct version and parent directories should not have an impact.\r\n\r\nFrom a technical perspective, the `verifyPackageTree.js` logic should see that the `cra-app` project contains the correctly installed version of `jest` and stop checking parent directories. Parent directories should only be traversed if `jest` is not installed.\r\n\r\n### Actual Behavior\r\n\r\nAn error occurs because parent directory depends on a version of `jest` that is incompatible with the version of `jest` that `create-react-app` generated project depends on.\r\n\r\n### Reproducible Demo\r\n\r\nhttps://github.com/newoga/create-react-app-issue-4167\r\n\r\n**Edit:** Updated the issue number on the links."},"comment":{"url":"https://api.github.com/repos/facebook/create-react-app/issues/comments/449277829","html_url":"https://github.com/facebook/create-react-app/issues/4167#issuecomment-449277829","issue_url":"https://api.github.com/repos/facebook/create-react-app/issues/4167","id":449277829,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTI3NzgyOQ==","user":{"login":"Soundharyaam","id":24657693,"node_id":"MDQ6VXNlcjI0NjU3Njkz","avatar_url":"https://avatars2.githubusercontent.com/u/24657693?v=4","gravatar_id":"","url":"https://api.github.com/users/Soundharyaam","html_url":"https://github.com/Soundharyaam","followers_url":"https://api.github.com/users/Soundharyaam/followers","following_url":"https://api.github.com/users/Soundharyaam/following{/other_user}","gists_url":"https://api.github.com/users/Soundharyaam/gists{/gist_id}","starred_url":"https://api.github.com/users/Soundharyaam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Soundharyaam/subscriptions","organizations_url":"https://api.github.com/users/Soundharyaam/orgs","repos_url":"https://api.github.com/users/Soundharyaam/repos","events_url":"https://api.github.com/users/Soundharyaam/events{/privacy}","received_events_url":"https://api.github.com/users/Soundharyaam/received_events","type":"User","site_admin":false},"created_at":"2018-12-21T06:47:24Z","updated_at":"2018-12-21T06:47:24Z","author_association":"NONE","body":"@Experiment8 No problem. I solved this by deleting the global `node modules` folder which was installed in the users folder of my mac. "}}
{"actor":{"display_login":"Soundharyaam"}}