microsoft / dts-gen

dts-gen creates starter TypeScript definition files for any module or library.
MIT License
2.43k stars 101 forks source link

Unexpected crash: dts-gen -m fhir-kit-client #130

Open thril opened 5 years ago

thril commented 5 years ago
[thril: ~/Projects/fhir ]🍕 dts-gen -m fhir-kit-client
Unexpected crash! Please log a bug with the commandline you specified.
/Users/thril/.config/yarn/global/node_modules/dts-gen/bin/lib/run.js:130
        throw e;
        ^

TypeError: Cannot read property 'baseUrl' of undefined
    at Object.get baseUrl [as baseUrl] (/Users/thril/Projects/fhir/node_modules/fhir-kit-client/lib/client.js:33:28)
    at getProperty (/Users/thril/.config/yarn/global/node_modules/dts-gen/bin/lib/index.js:254:30)
    at Array.map (<anonymous>)
    at getPropertyDeclarationsOfObject (/Users/thril/.config/yarn/global/node_modules/dts-gen/bin/lib/index.js:250:25)
    at getTypeOfValue (/Users/thril/.config/yarn/global/node_modules/dts-gen/bin/lib/index.js:237:33)
    at getResult (/Users/thril/.config/yarn/global/node_modules/dts-gen/bin/lib/index.js:173:32)
    at getTopLevelDeclarations (/Users/thril/.config/yarn/global/node_modules/dts-gen/bin/lib/index.js:123:17)
    at getResult (/Users/thril/.config/yarn/global/node_modules/dts-gen/bin/lib/index.js:148:17)
    at getTopLevelDeclarations (/Users/thril/.config/yarn/global/node_modules/dts-gen/bin/lib/index.js:123:17)
    at Object.generateModuleDeclarationFile (/Users/thril/.config/yarn/global/node_modules/dts-gen/bin/lib/index.js:49:19)

In this case, this crash is happening in this getter in the fhir-kit-client lib...

  get baseUrl() {
    return this.httpClient.baseUrl;
  }

node: 11.7.0 yarn: 1.13.0 dts-gen: 0.5.7 fhir-kit-client: 1.2.2