{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/create-react-app/issues/5207","repository_url":"https://api.github.com/repos/facebook/create-react-app","labels_url":"https://api.github.com/repos/facebook/create-react-app/issues/5207/labels{/name}","comments_url":"https://api.github.com/repos/facebook/create-react-app/issues/5207/comments","events_url":"https://api.github.com/repos/facebook/create-react-app/issues/5207/events","html_url":"https://github.com/facebook/create-react-app/issues/5207","id":365599243,"node_id":"MDU6SXNzdWUzNjU1OTkyNDM=","number":5207,"title":"Building with babel-eslint fails on windows with class-properties","user":{"login":"JeffBaumgardt","id":777527,"node_id":"MDQ6VXNlcjc3NzUyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/777527?v=4","gravatar_id":"","url":"https://api.github.com/users/JeffBaumgardt","html_url":"https://github.com/JeffBaumgardt","followers_url":"https://api.github.com/users/JeffBaumgardt/followers","following_url":"https://api.github.com/users/JeffBaumgardt/following{/other_user}","gists_url":"https://api.github.com/users/JeffBaumgardt/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffBaumgardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffBaumgardt/subscriptions","organizations_url":"https://api.github.com/users/JeffBaumgardt/orgs","repos_url":"https://api.github.com/users/JeffBaumgardt/repos","events_url":"https://api.github.com/users/JeffBaumgardt/events{/privacy}","received_events_url":"https://api.github.com/users/JeffBaumgardt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/facebook/create-react-app/milestones/30","html_url":"https://github.com/facebook/create-react-app/milestone/30","labels_url":"https://api.github.com/repos/facebook/create-react-app/milestones/30/labels","id":2507265,"node_id":"MDk6TWlsZXN0b25lMjUwNzI2NQ==","number":30,"title":"2.0","description":"","creator":{"login":"gaearon","id":810438,"node_id":"MDQ6VXNlcjgxMDQzOA==","avatar_url":"https://avatars0.githubusercontent.com/u/810438?v=4","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},"open_issues":3,"closed_issues":364,"state":"open","created_at":"2017-05-08T14:28:51Z","updated_at":"2018-10-01T19:34:01Z","due_on":"2018-10-01T07:00:00Z","closed_at":null},"comments":12,"created_at":"2018-10-01T19:03:43Z","updated_at":"2018-10-01T19:36:45Z","closed_at":null,"author_association":"NONE","body":"### Is this a bug report?\r\nYes\r\n\r\n### Did you try recovering your dependencies?\r\nYes\r\n\r\n### Which terms did you search for in User Guide?\r\nYes\r\n\r\n\r\n### Environment\r\n\r\nNote `npx create-react-app --info` is not working on Windows 10\r\n\r\nSystem: Windows 10\r\nNPM: 6.0.0\r\nNode: 10.10.0\r\nReact-scripts: 1.1.5\r\n\r\n\r\n### Steps to Reproduce\r\n\r\n1. `npx create-react-app my-app-name`\r\n2. `npm install -D babel-eslint`\r\n3. Modify `App.js` to include state as a class-property\r\n```js\r\nclass App extends Component {\r\n  state = {\r\n    message: \"Hello React App\"\r\n  };\r\n  render() {\r\n    const { message } = this.state;\r\n    return (\r\n      <div className=\"App\">\r\n        <header className=\"App-header\">\r\n          <img src={logo} className=\"App-logo\" alt=\"logo\" />\r\n          <h1 className=\"App-title\">{message}</h1>\r\n        </header>\r\n        <p className=\"App-intro\">\r\n          To get started, edit <code>src/App.js</code> and save to reload.\r\n        </p>\r\n      </div>\r\n    );\r\n  }\r\n}\r\n```\r\n4. Run `npm run build`\r\n\r\n\r\n### Expected Behavior\r\n\r\nI would expect the build to complete as expected.\r\n\r\n\r\n### Actual Behavior\r\n\r\nThe build fails with the error `no-undef` for the state that was defined in the component\r\n\r\n```cli\r\nPS C:\\Node\\windows-build-failure> npm run build\r\n\r\n> windows-build-failure@0.1.0 build C:\\Node\\windows-build-failure\r\n> react-scripts build\r\n\r\nCreating an optimized production build...\r\nFailed to compile.\r\n\r\n./src/App.js\r\n  Line 6:  'state' is not defined  no-undef\r\n\r\nSearch for the keywords to learn more about each error.\r\n\r\n\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! windows-build-failure@0.1.0 build: `react-scripts build`\r\nnpm ERR! Exit status 1\r\nnpm ERR!\r\nnpm ERR! Failed at the windows-build-failure@0.1.0 build script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR!     C:\\Users\\jbaumgardt\\AppData\\Roaming\\npm-cache\\_logs\\2018-10-01T19_01_21_162Z-debug.log\r\n```\r\n\r\n\r\n### Reproducible Demo\r\n\r\nAs shown above, I can clone the repo and share if you wish, I only added a state class-property and installed babel-eslint.\r\n\r\nIn my real-world example I have a `.eslintrc` file for additional lint rules for VSCode to enforce more lint rules in development and pre-commit.\r\n\r\nIf I remove babel-eslint dependency the build will work.\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/create-react-app/issues/comments/426035357","html_url":"https://github.com/facebook/create-react-app/issues/5207#issuecomment-426035357","issue_url":"https://api.github.com/repos/facebook/create-react-app/issues/5207","id":426035357,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjAzNTM1Nw==","user":{"login":"JeffBaumgardt","id":777527,"node_id":"MDQ6VXNlcjc3NzUyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/777527?v=4","gravatar_id":"","url":"https://api.github.com/users/JeffBaumgardt","html_url":"https://github.com/JeffBaumgardt","followers_url":"https://api.github.com/users/JeffBaumgardt/followers","following_url":"https://api.github.com/users/JeffBaumgardt/following{/other_user}","gists_url":"https://api.github.com/users/JeffBaumgardt/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffBaumgardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffBaumgardt/subscriptions","organizations_url":"https://api.github.com/users/JeffBaumgardt/orgs","repos_url":"https://api.github.com/users/JeffBaumgardt/repos","events_url":"https://api.github.com/users/JeffBaumgardt/events{/privacy}","received_events_url":"https://api.github.com/users/JeffBaumgardt/received_events","type":"User","site_admin":false},"created_at":"2018-10-01T19:36:45Z","updated_at":"2018-10-01T19:36:45Z","author_association":"NONE","body":"If I run eslint direct using the above config and installed plugins, flowtype, cypress, import, Configs for react-app and prettier. I do not get the errors as seen in the build."}}
{"actor":{"display_login":"JeffBaumgardt"}}