microsoft / dts-gen

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

dts-gen, unexpected crash using Adal-Node module. #13

Open jongeller opened 7 years ago

jongeller commented 7 years ago

Ran into this today while trying to short-cut writing a typings file. It asked that I log a bug since it was an unexpected crash. If it can be resolved, awesome!

Tried using Windows 10, administrative Powershell and command prompt, both dts-gen and adal-node were loaded globally with npm install -g <module>.

C:\> dts-gen -m adal-node
Unexpected crash! Please log a bug with the commandline you specified.
dts-gen : C:\Users\<username>\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\run.js:107
At line:1 char:1
+ dts-gen -m adal-node
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (C:\Users\<username>...\lib\run.js:107:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

        throw e;
        ^
TypeError: Cannot read property 'url' of undefined
    at AuthenticationContext.Object.defineProperty.get 
(C:\Users\<username>\AppData\Roaming\npm\node_modules\adal-node\lib\authentication-context.js:109:27)
    at C:\Users\<username>\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:272:143
    at Array.map (native)
    at getClassPrototypeMembers (C:\Users\<username>\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:272:75)
    at getResult (C:\Users\<username>\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:138:17)
    at getTopLevelDeclarations (C:\Users\<username>\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:126:15)
    at getResult (C:\Users\<username>\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:198:33)
    at getTopLevelDeclarations (C:\Users\<username>\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:126:15)
    at Object.generateModuleDeclarationFile 
(C:\Users\<username>\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:49:17)
    at Object.<anonymous> (C:\Users\<username>\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\run.js:52:24)