{"action":"created","issue":{"url":"https://api.github.com/repos/aws-amplify/amplify-cli/issues/278","repository_url":"https://api.github.com/repos/aws-amplify/amplify-cli","labels_url":"https://api.github.com/repos/aws-amplify/amplify-cli/issues/278/labels{/name}","comments_url":"https://api.github.com/repos/aws-amplify/amplify-cli/issues/278/comments","events_url":"https://api.github.com/repos/aws-amplify/amplify-cli/issues/278/events","html_url":"https://github.com/aws-amplify/amplify-cli/issues/278","id":367571476,"node_id":"MDU6SXNzdWUzNjc1NzE0NzY=","number":278,"title":"amplify codegen types fails in unrelated file ","user":{"login":"mwarger","id":686823,"node_id":"MDQ6VXNlcjY4NjgyMw==","avatar_url":"https://avatars3.githubusercontent.com/u/686823?v=4","gravatar_id":"","url":"https://api.github.com/users/mwarger","html_url":"https://github.com/mwarger","followers_url":"https://api.github.com/users/mwarger/followers","following_url":"https://api.github.com/users/mwarger/following{/other_user}","gists_url":"https://api.github.com/users/mwarger/gists{/gist_id}","starred_url":"https://api.github.com/users/mwarger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwarger/subscriptions","organizations_url":"https://api.github.com/users/mwarger/orgs","repos_url":"https://api.github.com/users/mwarger/repos","events_url":"https://api.github.com/users/mwarger/events{/privacy}","received_events_url":"https://api.github.com/users/mwarger/received_events","type":"User","site_admin":false},"labels":[{"id":1033398247,"node_id":"MDU6TGFiZWwxMDMzMzk4MjQ3","url":"https://api.github.com/repos/aws-amplify/amplify-cli/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"open","locked":false,"assignee":{"login":"yuth","id":511386,"node_id":"MDQ6VXNlcjUxMTM4Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/511386?v=4","gravatar_id":"","url":"https://api.github.com/users/yuth","html_url":"https://github.com/yuth","followers_url":"https://api.github.com/users/yuth/followers","following_url":"https://api.github.com/users/yuth/following{/other_user}","gists_url":"https://api.github.com/users/yuth/gists{/gist_id}","starred_url":"https://api.github.com/users/yuth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuth/subscriptions","organizations_url":"https://api.github.com/users/yuth/orgs","repos_url":"https://api.github.com/users/yuth/repos","events_url":"https://api.github.com/users/yuth/events{/privacy}","received_events_url":"https://api.github.com/users/yuth/received_events","type":"User","site_admin":false},"assignees":[{"login":"yuth","id":511386,"node_id":"MDQ6VXNlcjUxMTM4Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/511386?v=4","gravatar_id":"","url":"https://api.github.com/users/yuth","html_url":"https://github.com/yuth","followers_url":"https://api.github.com/users/yuth/followers","following_url":"https://api.github.com/users/yuth/following{/other_user}","gists_url":"https://api.github.com/users/yuth/gists{/gist_id}","starred_url":"https://api.github.com/users/yuth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuth/subscriptions","organizations_url":"https://api.github.com/users/yuth/orgs","repos_url":"https://api.github.com/users/yuth/repos","events_url":"https://api.github.com/users/yuth/events{/privacy}","received_events_url":"https://api.github.com/users/yuth/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2018-10-07T16:42:29Z","updated_at":"2018-10-20T01:56:46Z","closed_at":null,"author_association":"NONE","body":"**Describe the bug**\r\nRunning `amplify codegen types` does not run correctly.  Fails in unrelated file (e.g. a file with no graphql type declarations in it)\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. run `amplify codgen types` (or, since I'm on windows `wsl amplify codegen types`)\r\n2. See error below\r\n\r\n**Expected behavior**\r\nCodegen works by generating types\r\n\r\n**Screenshots**\r\n```\r\n\r\nproject-web develop * = $ wsl amplify codegen types\r\n✔ Downloaded the schema\r\n⠋ Generating2018-10-07T16:29:12.191Z - error: uncaughtException: Syntax Error src/components/auth/SignUpForm.tsx (1:1) Unexpected (\r\n\r\n1: ()\r\n   ^\r\n2: () -\r\n date=Sun Oct 07 2018 10:29:10 GMT-0600 (GMT-06:00), pid=4, uid=1000, gid=1000, cwd=/mnt/c/dev/slx/project-web, execPath=/usr/bin/node, version=v10.9.0, argv=[/usr/bin/node, /usr/bin/amplify, codegen, types], rss=115699712, heapTotal=94654464, heapUsed=55606320,\r\nexternal=1671191, loadavg=[0.5185546875, 0.57763671875, 0.5859375], uptime=16, trace=[column=15, file=/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/node_modules/graphql/error/syntaxError.js, function=syntaxError, line=30, method=null, native=false, column=33, file=/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/node_modules/graphql/language/parser.js, function=unexpected, line=995, method=null, native=false, column=9, file=/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/node_modules/graphql/language/parser.js, function=parseDefinition, line=154, method=null, native=false, column=22, file=/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/node_modules/graphql/language/parser.js, function=parseDocument, line=108, method=null, native=false, column=10, file=/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/node_modules/graphql/language/parser.js, function=Object.parse, line=45, method=parse, native=false, column=56, file=/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/src/loading.ts, function=graphql_1.concatAST.sources.map.source, line=84, method=source, native=false, column=null, file=null, function=Array.map, line=null, method=map, native=false, column=42, file=/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/src/loading.ts, function=Object.loadAndMergeQueryDocuments, line=84, method=loadAndMergeQueryDocuments, native=false, column=20, file=/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/src/generate.ts, function=generate, line=33, method=null, native=false, column=7, file=/usr/lib/node_modules/@aws-amplify/cli/node_modules/amplify-codegen/src/commands/types.js, function=projects.forEach, line=39, method=forEach, native=false], **stack=[GraphQLError: Syntax Error src/components/auth/SignUpForm.tsx (1:1) Unexpected (, , 1: () ,    ^, 2: () -, ,     at syntaxError (/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/node_modules/graphql/error/syntaxError.js:30:15),**     at unexpected (/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/node_modules/graphql/language/parser.js:995:33),     at parseDefinition (/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/node_modules/graphql/language/parser.js:154:9),     at parseDocument (/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/node_modules/graphql/language/parser.js:108:22),     at Object.parse (/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/node_modules/graphql/language/parser.js:45:10),\r\n   at graphql_1.concatAST.sources.map.source (/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/src/loading.ts:84:56),     at Array.map (<anonymous>),     at Object.loadAndMergeQueryDocuments (/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/src/loading.ts:84:42),     at generate (/usr/lib/node_modules/@aws-amplify/cli/node_modules/aws-appsync-codegen/src/generate.ts:33:20),     at projects.forEach (/usr/lib/node_modules/@aws-amplify/cli/node_modules/amplify-codegen/src/commands/types.js:39:7)]\r\n```\r\n\r\n**Desktop (please complete the following information):**\r\n - OS: Windows\r\n\r\n**Additional context**\r\nAdd any other context about the problem here.\r\nVersion of amplify:\r\nwsl amplify -v\r\n0.1.27\r\n\r\nHere is the codegen config (as noted, this has previously worked without issue):\r\nwsl amplify codegen configure\r\n? Choose the code generation language target typescript\r\n? Enter the file name pattern of graphql queries, mutations and subscriptions src/**/*.tsx\r\n? Enter the file name for the generated code src/API.ts\r\n\r\nProject is running with typescript - this has worked consistently - something in the latest version seems to have broken this.  \r\n\r\nThanks for all the hard work on this project!"},"comment":{"url":"https://api.github.com/repos/aws-amplify/amplify-cli/issues/comments/431539638","html_url":"https://github.com/aws-amplify/amplify-cli/issues/278#issuecomment-431539638","issue_url":"https://api.github.com/repos/aws-amplify/amplify-cli/issues/278","id":431539638,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTUzOTYzOA==","user":{"login":"mwarger","id":686823,"node_id":"MDQ6VXNlcjY4NjgyMw==","avatar_url":"https://avatars3.githubusercontent.com/u/686823?v=4","gravatar_id":"","url":"https://api.github.com/users/mwarger","html_url":"https://github.com/mwarger","followers_url":"https://api.github.com/users/mwarger/followers","following_url":"https://api.github.com/users/mwarger/following{/other_user}","gists_url":"https://api.github.com/users/mwarger/gists{/gist_id}","starred_url":"https://api.github.com/users/mwarger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwarger/subscriptions","organizations_url":"https://api.github.com/users/mwarger/orgs","repos_url":"https://api.github.com/users/mwarger/repos","events_url":"https://api.github.com/users/mwarger/events{/privacy}","received_events_url":"https://api.github.com/users/mwarger/received_events","type":"User","site_admin":false},"created_at":"2018-10-20T01:56:46Z","updated_at":"2018-10-20T01:56:46Z","author_association":"NONE","body":"> @mwarger Could you please check out v 0.1.28 and see if you can reproduce it?\r\n\r\n@kaustavghosh06 I get the same error after I updated."}}
{"actor":{"display_login":"mwarger"}}