Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Cannot read property 'length' of undefined #100

Open
60pfennig opened this issue Aug 3, 2021 · 1 comment
Open

Cannot read property 'length' of undefined #100

60pfennig opened this issue Aug 3, 2021 · 1 comment

Comments

@60pfennig
Copy link

60pfennig commented Aug 3, 2021

Hi, I'm trying to use this tool to generate dart files for ketting. This is a library written in TS.
I have generated the definitions witch tsc --declaration. After that I use:
dart_js_facade_gen index.d.ts client.d.ts resource.d.ts link.d.ts util/uri.d.ts cache/forever.d.ts cache/short.d.ts cache/never.d.ts http/basic-auth.d.ts http/bearer-auth.d.ts http/oauth2.d.ts http/error.d.ts action.d.ts field.d.ts follow-promise.d.ts --destination=out
I'm getting this error then:

Transpiling [
  'index.d.ts',
  'client.d.ts',
  'resource.d.ts',
  'link.d.ts',
  'util/uri.d.ts',
  'cache/forever.d.ts',
  'cache/short.d.ts',
  'cache/never.d.ts',
  'http/basic-auth.d.ts',
  'http/bearer-auth.d.ts',
  'http/oauth2.d.ts',
  'http/error.d.ts',
  'action.d.ts',
  'field.d.ts',
] to out
C:\Users\kallenbach\AppData\Roaming\npm\node_modules\dart_js_facade_gen\index.js:28
  if (e.name !== 'DartFacadeError') throw e;
                                    ^

TypeError: Cannot read property 'length' of undefined
    at resolveModuleNamesReusingOldState (C:\Users\kallenbach\AppData\Roaming\npm\node_modules\dart_js_facade_gen\node_modules\typescript\lib\typescript.js:100372:80)
    at processImportedModules (C:\Users\kallenbach\AppData\Roaming\npm\node_modules\dart_js_facade_gen\node_modules\typescript\lib\typescript.js:101864:35)
    at findSourceFile (C:\Users\kallenbach\AppData\Roaming\npm\node_modules\dart_js_facade_gen\node_modules\typescript\lib\typescript.js:101607:17)
    at processImportedModules (C:\Users\kallenbach\AppData\Roaming\npm\node_modules\dart_js_facade_gen\node_modules\typescript\lib\typescript.js:101900:25)
    at findSourceFile (C:\Users\kallenbach\AppData\Roaming\npm\node_modules\dart_js_facade_gen\node_modules\typescript\lib\typescript.js:101607:17)
    at processImportedModules (C:\Users\kallenbach\AppData\Roaming\npm\node_modules\dart_js_facade_gen\node_modules\typescript\lib\typescript.js:101900:25)
    at findSourceFile (C:\Users\kallenbach\AppData\Roaming\npm\node_modules\dart_js_facade_gen\node_modules\typescript\lib\typescript.js:101607:17)
    at C:\Users\kallenbach\AppData\Roaming\npm\node_modules\dart_js_facade_gen\node_modules\typescript\lib\typescript.js:101436:85
    at getSourceFileFromReferenceWorker (C:\Users\kallenbach\AppData\Roaming\npm\node_modules\dart_js_facade_gen\node_modules\typescript\lib\typescript.js:101403:34)
    at processSourceFile (C:\Users\kallenbach\AppData\Roaming\npm\node_modules\dart_js_facade_gen\node_modules\typescript\lib\typescript.js:101436:13)

Using this with different d.ts files tis way is working fine.

@p02diada
Copy link

p02diada commented Feb 6, 2022

I'm having the same problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants