TypeChain icon indicating copy to clipboard operation
TypeChain copied to clipboard

Error occured: '{' expected...

Open mesozoic-technology opened this issue 3 years ago • 0 comments

When I run the command npx typechain --discriminate-types --target ethers-v5 out/**/*.json --show-stack-traces I get this following stack trace...

  55 |   
  56 |
> 57 |     export interface print_bytes[]_array_EventObject {arg0: string[][] };
     |                                 ^
  58 |     export type print_bytes[]_array_Event = TypedEvent<[string[][]], print_bytes[]_array_EventObject>;
  59 |
  60 |     export type print_bytes[]_array_EventFilter = TypedEventFilter<print_bytes[]_array_Event>;
Stack trace:  SyntaxError: '{' expected. (57:33)
  55 |   
  56 |
> 57 |     export interface print_bytes[]_array_EventObject {arg0: string[][] };
     |                                 ^
  58 |     export type print_bytes[]_array_Event = TypedEvent<[string[][]], print_bytes[]_array_EventObject>;
  59 |
  60 |     export type print_bytes[]_array_EventFilter = TypedEventFilter<print_bytes[]_array_Event>;
    at Ve (/Users/realisation/git/guaranteed-clean/guaranteed-clean-monorepo/node_modules/prettier/parser-typescript.js:1:15607)
    at vz (/Users/realisation/git/guaranteed-clean/guaranteed-clean-monorepo/node_modules/prettier/parser-typescript.js:280:5919)
    at Object.yz [as parse] (/Users/realisation/git/guaranteed-clean/guaranteed-clean-monorepo/node_modules/prettier/parser-typescript.js:280:6242)
    at Object.parse (/Users/realisation/git/guaranteed-clean/guaranteed-clean-monorepo/node_modules/prettier/index.js:7334:23)
    at coreFormat (/Users/realisation/git/guaranteed-clean/guaranteed-clean-monorepo/node_modules/prettier/index.js:8645:18)
    at formatWithCursor2 (/Users/realisation/git/guaranteed-clean/guaranteed-clean-monorepo/node_modules/prettier/index.js:8837:18)
    at /Users/realisation/git/guaranteed-clean/guaranteed-clean-monorepo/node_modules/prettier/index.js:37229:12
    at Object.format (/Users/realisation/git/guaranteed-clean/guaranteed-clean-monorepo/node_modules/prettier/index.js:37243:12)
    at prettierOutputTransformer (/Users/realisation/git/guaranteed-clean/guaranteed-clean-monorepo/node_modules/typechain/dist/codegen/outputTransformers/prettier.js:6:21)
    at /Users/realisation/git/guaranteed-clean/guaranteed-clean-monorepo/node_modules/typechain/dist/typechain/io.js:19:102

My dependencies look like this:

  "dependencies": {
    "@ethersproject/abi": "^5.6.4",
    "@typechain/ethers-v5": "^10.1.0",
    "typechain": "^8.1.0"
  }

mesozoic-technology avatar Aug 02 '22 22:08 mesozoic-technology