microsoft / dts-gen

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

Unexpected crash -- ReferenceError: document is not defined #25

Open eamodio opened 7 years ago

eamodio commented 7 years ago
> dts-gen -d -m quill
Unexpected crash! Please log a bug with the commandline you specified.
/usr/local/lib/node_modules/dts-gen/bin/lib/run.js:109
        throw e;
        ^

ReferenceError: document is not defined
    at Object.<anonymous> (/Users/eric/Code/foo/node_modules/quill/dist/quill.js:2332:13)
    at __webpack_require__ (/Users/eric/Code/foo/node_modules/quill/dist/quill.js:36:30)
    at Object.<anonymous> (/Users/eric/Code/foo/node_modules/quill/dist/quill.js:1659:2)
    at __webpack_require__ (/Users/eric/Code/foo/node_modules/quill/dist/quill.js:36:30)
    at Object.<anonymous> (/Users/eric/Code/foo/node_modules/quill/dist/quill.js:76:15)
    at __webpack_require__ (/Users/eric/Code/foo/node_modules/quill/dist/quill.js:36:30)
    at Object.defineProperty.value (/Users/eric/Code/foo/node_modules/quill/dist/quill.js:7730:14)
    at __webpack_require__ (/Users/eric/Code/foo/node_modules/quill/dist/quill.js:36:30)
    at Object.<anonymous> (/Users/eric/Code/foo/node_modules/quill/dist/quill.js:63:19)
    at __webpack_require__ (/Users/eric/Code/foo/node_modules/quill/dist/quill.js:36:30)
shelltr commented 7 years ago

I have what I think is a similar issue with generating a file for adapterjs:


/home/oborg/.nvm/versions/node/v6.9.2/lib/node_modules/dts-gen/bin/lib/run.js:109
        throw e;
        ^

ReferenceError: navigator is not defined
    at Object.<anonymous> (/home/oborg/.nvm/versions/node/v6.9.2/lib/node_modules/adapterjs/publish/adapter.min.js:
2:1044)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/oborg/.nvm/versions/node/v6.9.2/lib/node_modules/dts-gen/bin/lib/run.js:54:67)
    at Module._compile (module.js:570:32)```
TK-21st commented 6 years ago

Same issue with jsoneditor

Unexpected crash! Please log a bug with the commandline you specified.
/Users/tingkailiu/.nvm/versions/node/v9.11.1/lib/node_modules/dts-gen/bin/lib/run.js:130
        throw e;
        ^

ReferenceError: navigator is not defined
    at Object.<anonymous> (/Users/tingkailiu/.nvm/versions/node/v9.11.1/lib/node_modules/jsoneditor/src/js/i18n.js:116:16)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)
    at Object.<anonymous> (/Users/tingkailiu/.nvm/versions/node/v9.11.1/lib/node_modules/jsoneditor/src/js/ContextMenu.js:4:17)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
wolph commented 4 years ago

And vuejs-toggle-switch has the error as well