Informatievlaanderen / OSLO-UML-Transformer

Software components that are used within the OSLO Toolchain
MIT License
5 stars 3 forks source link

How to run OSLO Enterprise Architect UML Extractor? #52

Closed cristianvasquez closed 4 months ago

cristianvasquez commented 5 months ago

Issue type:


Description:

Hi, I'm trying to run oslo-extractor-uml-ea as standalone, using the readme file as reference but it fails to run


Crash log:

Error: Cannot find module '@oslo-extractor-uml-ea/DataRegistry'

KristofVDB1 commented 4 months ago

Thanks for opening the issue @cristianvasquez ! I'll look into this today

KristofVDB1 commented 4 months ago

The issue has been resolved. It was related to something we did not cover for one of our installed libraries, being module-alias.

Please upgrade your version of @oslo-flanders/ea-uml-extractor to 0.0.17-alpha.0 or higher.

The code below should work

const { DataRegistry } = require("@oslo-flanders/ea-uml-extractor");

const extractModel = async () => {
    const model = new DataRegistry();
    await model.extract("link/to/eap.eap");
    console.log(model);
}

extractModel();

If this issue persists, feel free to reopen this issue.