staruml / mdgen Goto Github PK
View Code? Open in Web Editor NEWModel-Driven Code Generator
License: MIT License
Model-Driven Code Generator
License: MIT License
running mdgen pdf -m model.mdj -o document.pdf
results in the following error:
TypeError: Cannot read property 'unicodeRanges' of null
at Object.getFontInfo (/usr/lib/node_modules/mdgen/node_modules/metadata-json/lib/Font.js:65:14)
at Canvas._setFont (/usr/lib/node_modules/mdgen/node_modules/metadata-json/lib/PDFGraphics.js:108:29)
at Canvas.textExtent (/usr/lib/node_modules/mdgen/node_modules/metadata-json/lib/PDFGraphics.js:811:14)
at LabelView.sizeObject (/usr/lib/node_modules/mdgen/node_modules/metadata-json/core/Core.js:2523:27)
at LabelView.View.size (/usr/lib/node_modules/mdgen/node_modules/metadata-json/core/Core.js:1467:14)
at UMLNameCompartmentView.UMLCompartmentView.size (/usr/lib/node_modules/mdgen/node_modules/metadata-json/uml/UMLDiagram.js:355:18)
at UMLNameCompartmentView.size (/usr/lib/node_modules/mdgen/node_modules/metadata-json/uml/UMLDiagram.js:450:43)
at UMLClassView.View.size (/usr/lib/node_modules/mdgen/node_modules/metadata-json/core/Core.js:1465:15)
at /usr/lib/node_modules/mdgen/node_modules/metadata-json/lib/pdf.js:86:15
at Function._.each._.forEach (/usr/lib/node_modules/mdgen/node_modules/underscore/underscore.js:103:9)
The file model.mdj
exists and was created with StarUML (no other modification)
The file document.pdf
does not exists before the execution of mdgen
but does exist afterwards, but can't be opened.
When exporting mdj to HTML the Images are not rendered properly. Elements are not where they should be and the size of some elements is not correct.
Version: latest (0.9.1)
OS: Ubuntu 14.04; Ubuntu 16.04; Debian
Hello,
I just updated mdgen and got the following error message when I tried to convert one of our files:
{ [TypeError: /usr/lib/node_modules/mdgen/node_modules/metadata-json/lib/../resources/html/templates/navigation.ejs:8
6| <% include head %>
7| </head>
>> 8| <body>
9|
10| <div style="padding-top: 1em; overflow-x: auto; width: 100%">
11| <div style="margin-bottom: 1em;">
Cannot read property 'name' of undefined]
path: '/usr/lib/node_modules/mdgen/node_modules/metadata-json/lib/../resources/html/templates/navigation.ejs' }
Mdgen version 0.9.0 works fine with this file, though.
Thanks!
When mdgen encountered the error referred to in issue #1, it returned success although it had failed.
I tried to install mdgen using
sudo npm install -g mdgen
and got the following error
/usr/local/bin/mdgen -> /usr/local/lib/node_modules/mdgen/bin/mdgen.js
/usr/local/bin/mdgen-image -> /usr/local/lib/node_modules/mdgen/bin/mdgen-image.js
/usr/local/bin/mdgen-render -> /usr/local/lib/node_modules/mdgen/bin/mdgen-render.js
/usr/local/bin/mdgen-pdf -> /usr/local/lib/node_modules/mdgen/bin/mdgen-pdf.js
/usr/local/bin/mdgen-html -> /usr/local/lib/node_modules/mdgen/bin/mdgen-html.js
> [email protected] install /usr/local/lib/node_modules/mdgen/node_modules/canvas
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/mdgen/node_modules/canvas/build'
gyp ERR! System Darwin 17.0.0
gyp ERR! command "/usr/local/Cellar/node/8.7.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/mdgen/node_modules/canvas
gyp ERR! node -v v8.7.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/yaojian/.npm/_logs/2017-10-20T09_51_49_587Z-debug.log
The permission of /usr/local/lib/node_modules
is:
drwxr-xr-x 4 yaojian admin 128 Oct 20 17:51 node_modules
any help ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.