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

Unexpected crash! Please log a bug with the commandline you specified. #157

Closed
stitze opened this issue Apr 24, 2020 · 1 comment
Closed

Comments

@stitze
Copy link

stitze commented Apr 24, 2020

Try to generate a definition file for http://britecharts.github.io/britecharts via command

`dts-gen -m britecharts

Unexpected crash! Please log a bug with the commandline you specified.
userpath\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\run.js:125
throw e;
^

ReferenceError: window is not defined
at Object. (pathtoproject\node_modules\britecharts\dist\bundled\britecharts.min.js:1:204)
at Module._compile (internal/modules/cjs/loader.js:1157:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
at Module.load (internal/modules/cjs/loader.js:1001:32)
at Function.Module._load (internal/modules/cjs/loader.js:900:14)
at Module.require (internal/modules/cjs/loader.js:1043:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object. (userpath\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\run.js:58:67)
at Module._compile (internal/modules/cjs/loader.js:1157:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)`

@stitze
Copy link
Author

stitze commented Apr 24, 2020

Solved it by adding

var window=window || {};

to the top of the file britecharts.min.js and also added

var navigator=navigator || {};

After that I get I definition file.

@stitze stitze closed this as completed Apr 24, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant