upgrading to 14.0.2 - .tsx: Unexpected token, expected "}"
See original GitHub issueHi, after upgrading to 14.0.2 I get this error when i run the command gql-gen
, but the typescript is perfectly valid. :S
> gql-gen
√ Parse configuration
> Generate outputs
> Generate src/app/shared/models/graphql/types.ts
√ Load GraphQL schemas
× Load GraphQL documents
→ 35 | ],
Generate
√ Generate src/app/shared/models/graphql/services.ts
We found 1 errors
Failed to generate src/app/shared/models/graphql/types.ts
SyntaxError: C:\Users\<username>\source\repos\<projectname>\MyProject.Web\.tsx: Unexpected token, expected "}" (32:14)
30 | static forRoot(): ModuleWithProviders {
31 | return <ModuleWithProviders>{
> 32 | ngModule: CoreModule,
| ^
33 | providers: [
34 | ...NB_CORE_PROVIDERS,
35 | ],
codegen.yml
schema:
- 'schema.json'
overwrite: true
config:
avoidOptionals: false
generates:
src/app/shared/models/graphql/types.ts:
documents:
- './src/app/**/*.ts'
plugins:
- 'typescript-common'
- 'typescript-client'
- 'typescript-server'
src/app/shared/models/graphql/services.ts:
documents:
- './src/app/**/*.gql'
plugins:
- 'typescript-common'
- 'typescript-client'
- 'typescript-apollo-angular'
Issue Analytics
- State:
- Created 5 years ago
- Comments:14
Top Results From Across the Web
How to fix Parsing error: Unexpected token, expected "," in ...
I found the issue by cloning into your repo. It is with "parser": "babel" in eslint.rc prettier/prettier . Use "parser": "babel-ts" or ...
Read more >unexpected token, expected "," jest - You.com | The AI Search ...
It appears to me that there is an issue in the package you're using. It's trying to use ES modules syntax (import /...
Read more >'Unexpected token' error - Upgrade from QV 11.2 to... - 14052
'Unexpected token' error - Upgrade from QV 11.2 to November 2017 SR3. After upgrading, one document (No changes) keeps failing while running.
Read more >15 - Line 35:9: Parsing error: Unexpected token, expected ...
Parsing error: Unexpected token, expected "," Error Solved in React You could not pass two values in return.Watch Full Part of Video ...
Read more >[Solved] Argh... Unexpected token, expected "}"
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We changed the way we extract documents from ts and js files. Before that we used RegExp, now we use the library that our teammate wrote. It uses AST to find stuff based on the default export of
graphql-tag
.I’ll release a v0.14.4 soon.
Released in
v0.15.0