TsUML
TsUML copied to clipboard
Error for generating the UML
Got the error while running the following statement in angular project tsuml --glob ./src/**/*.ts
TypeError: Cannot read property 'replace' of undefined at Request._callback (C:\User\AppData\Roaming\npm\node_modules\tsuml\dist\core\io.js:71:48) at self.callback (C:\Users\AppData\Roaming\npm\node_modules\tsuml\node_modules\request\request.js:186:22) at Request.emit (events.js:182:13) at Request.onRequestError (C:\Users\AppData\Roaming\npm\node_modules\tsuml\node_modules\request\request.js:878:8) at ClientRequest.emit (events.js:182:13) at TLSSocket.socketErrorListener (_http_client.js:375:9) at TLSSocket.emit (events.js:182:13) at emitErrorNT (internal/streams/destroy.js:82:8) at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) at process._tickCallback (internal/process/next_tick.js:63:19)
same here,..
@aryanisml ; @webia1 I also faced similar issue on checking the io.js file found that it might have something to do with connection or firewall setting not allowing to connect with "https://yuml.me/diagram/plain/class/".[Just my rough guess ;) ] .So inside the function download where the error is coming, I did a console log of the "dsl" that is passed. It would look something like this "[AppRoutingModule{bg:skyblue}][AppRoutingModule||],,[AppComponent{bg:skyblue}][AppComponent|title;isHeaderVisible;|]......". Then simply append the above "dsl" string to the above url so that it should look something like "https://yuml.me/diagram/plain/class/[AppRoutingModule{bg:skyblue}][AppRoutingModule||],,[AppComponent{bg:skyblue}][AppComponent|title;isHeaderVisible;|]......". Copy and paste it in browser and you should get your diagram. Another option is to open Postman and do a post on above url with form-data having key "dsl_text" and value as "dsl" that you have copied earlier. Hope it helps :)
$ tsuml --glob ./src/**/*.ts does not work properly.
- When I list files with the extension *.ts I got more than 10 typescript files with class defined.
- However, I got only the first *.ts file (out of 10 ts files) picked up by the tsuml, hence is useless.
- I have also changed the node versions with nvm utility. Eg) v8.9.3, v7.7.1, etc Do I have anything missing to use the tool properly? Thanks.
@woogonchung Please refer https://github.com/remojansen/TsUML/issues/3#issuecomment-390290103
I am facing the same issue here
/Users/xxxx/demo-app/node_modules/tsuml/dist/core/io.js:71
var svgFileName = body.replace(".png", ".svg");
^
TypeError: Cannot read property 'replace' of undefined
at Request._callback (/Users/xxxx/demo-app/node_modules/tsuml/dist/core/io.js:71:48)
at self.callback (/Users/xxxx/demo-app/node_modules/tsuml/node_modules/request/request.js:186:22)
at Request.emit (events.js:189:13)
"tsuml": "0.0.1-alpha.8"
and node-v10.15.3