microsoft / dts-gen

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

crash for kekule #185

Open dipamsen opened 1 year ago

dipamsen commented 1 year ago

Kekule.js package - https://www.npmjs.com/package/kekule

C:\Users\dipam\Documents\projects\chemguessr>npx dts-gen -m kekule -f index.d.ts
Unexpected crash! Please log a bug with the commandline you specified.
C:\Users\dipam\AppData\Local\npm-cache\_npx\8ffe955cebeb71d5\node_modules\dts-gen\bin\lib\run.js:126
        throw e;
        ^

TypeError: Cannot read properties of null (reading 'prototype')
    at isClasslike (C:\Users\dipam\AppData\Local\npm-cache\_npx\8ffe955cebeb71d5\node_modules\dts-gen\bin\lib\index.js:110:19)
    at C:\Users\dipam\AppData\Local\npm-cache\_npx\8ffe955cebeb71d5\node_modules\dts-gen\bin\lib\index.js:43:41
    at Array.some (<anonymous>)
    at hasCloduleProperties (C:\Users\dipam\AppData\Local\npm-cache\_npx\8ffe955cebeb71d5\node_modules\dts-gen\bin\lib\index.js:43:31)
    at getValueTypes (C:\Users\dipam\AppData\Local\npm-cache\_npx\8ffe955cebeb71d5\node_modules\dts-gen\bin\lib\index.js:31:37)
    at getResult (C:\Users\dipam\AppData\Local\npm-cache\_npx\8ffe955cebeb71d5\node_modules\dts-gen\bin\lib\index.js:188:55)
    at getTopLevelDeclarations (C:\Users\dipam\AppData\Local\npm-cache\_npx\8ffe955cebeb71d5\node_modules\dts-gen\bin\lib\index.js:125:17)
    at Object.generateModuleDeclarationFile (C:\Users\dipam\AppData\Local\npm-cache\_npx\8ffe955cebeb71d5\node_modules\dts-gen\bin\lib\index.js:51:19)
    at Object.<anonymous> (C:\Users\dipam\AppData\Local\npm-cache\_npx\8ffe955cebeb71d5\node_modules\dts-gen\bin\lib\run.js:58:24)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)

Node.js v19.0.0
DomPeliniAerospike commented 10 months ago

Looks like I had a similar issue with the "aerospike" npm package. Result below.


dpelini@aero-dpelini:~/Documents/extra$ dts-gen -m aerospike Unexpected crash! Please log a bug with the commandline you specified. /home/dpelini/.nvm/versions/node/v18.17.0/lib/node_modules/dts-gen/bin/lib/run.js:125 throw e; ^

TypeError: Cannot read properties of undefined (reading 'prototype') at isClasslike (/home/dpelini/.nvm/versions/node/v18.17.0/lib/node_modules/dts-gen/bin/lib/index.js:109:19) at /home/dpelini/.nvm/versions/node/v18.17.0/lib/node_modules/dts-gen/bin/lib/index.js:42:41 at Array.some () at hasCloduleProperties (/home/dpelini/.nvm/versions/node/v18.17.0/lib/node_modules/dts-gen/bin/lib/index.js:42:31) at getValueTypes (/home/dpelini/.nvm/versions/node/v18.17.0/lib/node_modules/dts-gen/bin/lib/index.js:30:37) at getResult (/home/dpelini/.nvm/versions/node/v18.17.0/lib/node_modules/dts-gen/bin/lib/index.js:187:55) at getTopLevelDeclarations (/home/dpelini/.nvm/versions/node/v18.17.0/lib/node_modules/dts-gen/bin/lib/index.js:124:17) at Object.generateModuleDeclarationFile (/home/dpelini/.nvm/versions/node/v18.17.0/lib/node_modules/dts-gen/bin/lib/index.js:50:19) at Object. (/home/dpelini/.nvm/versions/node/v18.17.0/lib/node_modules/dts-gen/bin/lib/run.js:58:24) at Module._compile (node:internal/modules/cjs/loader:1256:14)

Node.js v18.17.0