How to use certain node module












0















My goal is to read in graphml files and retreive information about the fields that are contained within the nodes.



I have found a node module that seems to do just that so I decided I'd give it a try before writing my own code.



Unfortunately I the documentation is pretty poor and I have only been using node.js for about three months so I cannot figure out what the few clues given mean.




Global Install
npm install -g graphml-schema-generator
To have the wizard assist you with questions, type: gschema And answer the questions until finished.



Alternatively, you can use the following syntax: gschema path/to/graphml/file path/to/out/directory The paths can be either relative or absolute. The tool should pick on it either way.



Local Install
npm install --save graphm-schema-generator
You can either type the whole path to the file each time, such as: ./node_modules/gml-to-typescript/build/index Or you can create an npm script that references the path



However you choose to go about it, the usage is exactly the same as stated in the Global Install section. Please refer to that.



If you don't want to pollute your development environment this might be a better way to install this. Then you can use npm scripts to alias it to a more manageable command.




There's no GitHub repository or what-so-ever. I have read through the code and basically there are three files of which two seem to be sourcefiles (exporting some modules that are used in the last one) and one that's called "app.ts".



I somehow expected that I could use this module like



import {<ModuleName>} from 'graphml-schema-generator'; 


or



require('./node_modules/graphml-schema-generator";


but this isn't the case. I do not understand what



gschema path/to/graphml/file path/to/out/directory


would mean or how it would be used. I guess there's some basic misunderstanding about packages on my side.



here's an Image of the modules hierarchy



So I want to understand how to use this module and if so, what I did wrong
Thanks in advance










share|improve this question























  • What's the error?

    – Aluan Haddad
    Nov 13 '18 at 13:48











  • @Aluan Haddad When I try to use import or require it cannot find the module until I specifically enter the path to each file. Moreover, it seems like you don't create an instance of an exported module. The App.js file uses, for instance, "process.argv" which is used to capture input from the terminal (I guess) which leads me to thinking that I have to use this module via terminal and I don't know how to do this. The instructions on the node modules page aren't clear enough to me.

    – Roman Stadlhuber
    Nov 13 '18 at 13:57
















0















My goal is to read in graphml files and retreive information about the fields that are contained within the nodes.



I have found a node module that seems to do just that so I decided I'd give it a try before writing my own code.



Unfortunately I the documentation is pretty poor and I have only been using node.js for about three months so I cannot figure out what the few clues given mean.




Global Install
npm install -g graphml-schema-generator
To have the wizard assist you with questions, type: gschema And answer the questions until finished.



Alternatively, you can use the following syntax: gschema path/to/graphml/file path/to/out/directory The paths can be either relative or absolute. The tool should pick on it either way.



Local Install
npm install --save graphm-schema-generator
You can either type the whole path to the file each time, such as: ./node_modules/gml-to-typescript/build/index Or you can create an npm script that references the path



However you choose to go about it, the usage is exactly the same as stated in the Global Install section. Please refer to that.



If you don't want to pollute your development environment this might be a better way to install this. Then you can use npm scripts to alias it to a more manageable command.




There's no GitHub repository or what-so-ever. I have read through the code and basically there are three files of which two seem to be sourcefiles (exporting some modules that are used in the last one) and one that's called "app.ts".



I somehow expected that I could use this module like



import {<ModuleName>} from 'graphml-schema-generator'; 


or



require('./node_modules/graphml-schema-generator";


but this isn't the case. I do not understand what



gschema path/to/graphml/file path/to/out/directory


would mean or how it would be used. I guess there's some basic misunderstanding about packages on my side.



here's an Image of the modules hierarchy



So I want to understand how to use this module and if so, what I did wrong
Thanks in advance










share|improve this question























  • What's the error?

    – Aluan Haddad
    Nov 13 '18 at 13:48











  • @Aluan Haddad When I try to use import or require it cannot find the module until I specifically enter the path to each file. Moreover, it seems like you don't create an instance of an exported module. The App.js file uses, for instance, "process.argv" which is used to capture input from the terminal (I guess) which leads me to thinking that I have to use this module via terminal and I don't know how to do this. The instructions on the node modules page aren't clear enough to me.

    – Roman Stadlhuber
    Nov 13 '18 at 13:57














0












0








0








My goal is to read in graphml files and retreive information about the fields that are contained within the nodes.



I have found a node module that seems to do just that so I decided I'd give it a try before writing my own code.



Unfortunately I the documentation is pretty poor and I have only been using node.js for about three months so I cannot figure out what the few clues given mean.




Global Install
npm install -g graphml-schema-generator
To have the wizard assist you with questions, type: gschema And answer the questions until finished.



Alternatively, you can use the following syntax: gschema path/to/graphml/file path/to/out/directory The paths can be either relative or absolute. The tool should pick on it either way.



Local Install
npm install --save graphm-schema-generator
You can either type the whole path to the file each time, such as: ./node_modules/gml-to-typescript/build/index Or you can create an npm script that references the path



However you choose to go about it, the usage is exactly the same as stated in the Global Install section. Please refer to that.



If you don't want to pollute your development environment this might be a better way to install this. Then you can use npm scripts to alias it to a more manageable command.




There's no GitHub repository or what-so-ever. I have read through the code and basically there are three files of which two seem to be sourcefiles (exporting some modules that are used in the last one) and one that's called "app.ts".



I somehow expected that I could use this module like



import {<ModuleName>} from 'graphml-schema-generator'; 


or



require('./node_modules/graphml-schema-generator";


but this isn't the case. I do not understand what



gschema path/to/graphml/file path/to/out/directory


would mean or how it would be used. I guess there's some basic misunderstanding about packages on my side.



here's an Image of the modules hierarchy



So I want to understand how to use this module and if so, what I did wrong
Thanks in advance










share|improve this question














My goal is to read in graphml files and retreive information about the fields that are contained within the nodes.



I have found a node module that seems to do just that so I decided I'd give it a try before writing my own code.



Unfortunately I the documentation is pretty poor and I have only been using node.js for about three months so I cannot figure out what the few clues given mean.




Global Install
npm install -g graphml-schema-generator
To have the wizard assist you with questions, type: gschema And answer the questions until finished.



Alternatively, you can use the following syntax: gschema path/to/graphml/file path/to/out/directory The paths can be either relative or absolute. The tool should pick on it either way.



Local Install
npm install --save graphm-schema-generator
You can either type the whole path to the file each time, such as: ./node_modules/gml-to-typescript/build/index Or you can create an npm script that references the path



However you choose to go about it, the usage is exactly the same as stated in the Global Install section. Please refer to that.



If you don't want to pollute your development environment this might be a better way to install this. Then you can use npm scripts to alias it to a more manageable command.




There's no GitHub repository or what-so-ever. I have read through the code and basically there are three files of which two seem to be sourcefiles (exporting some modules that are used in the last one) and one that's called "app.ts".



I somehow expected that I could use this module like



import {<ModuleName>} from 'graphml-schema-generator'; 


or



require('./node_modules/graphml-schema-generator";


but this isn't the case. I do not understand what



gschema path/to/graphml/file path/to/out/directory


would mean or how it would be used. I guess there's some basic misunderstanding about packages on my side.



here's an Image of the modules hierarchy



So I want to understand how to use this module and if so, what I did wrong
Thanks in advance







node.js typescript npm visual-studio-code






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 13:15









Roman StadlhuberRoman Stadlhuber

31




31













  • What's the error?

    – Aluan Haddad
    Nov 13 '18 at 13:48











  • @Aluan Haddad When I try to use import or require it cannot find the module until I specifically enter the path to each file. Moreover, it seems like you don't create an instance of an exported module. The App.js file uses, for instance, "process.argv" which is used to capture input from the terminal (I guess) which leads me to thinking that I have to use this module via terminal and I don't know how to do this. The instructions on the node modules page aren't clear enough to me.

    – Roman Stadlhuber
    Nov 13 '18 at 13:57



















  • What's the error?

    – Aluan Haddad
    Nov 13 '18 at 13:48











  • @Aluan Haddad When I try to use import or require it cannot find the module until I specifically enter the path to each file. Moreover, it seems like you don't create an instance of an exported module. The App.js file uses, for instance, "process.argv" which is used to capture input from the terminal (I guess) which leads me to thinking that I have to use this module via terminal and I don't know how to do this. The instructions on the node modules page aren't clear enough to me.

    – Roman Stadlhuber
    Nov 13 '18 at 13:57

















What's the error?

– Aluan Haddad
Nov 13 '18 at 13:48





What's the error?

– Aluan Haddad
Nov 13 '18 at 13:48













@Aluan Haddad When I try to use import or require it cannot find the module until I specifically enter the path to each file. Moreover, it seems like you don't create an instance of an exported module. The App.js file uses, for instance, "process.argv" which is used to capture input from the terminal (I guess) which leads me to thinking that I have to use this module via terminal and I don't know how to do this. The instructions on the node modules page aren't clear enough to me.

– Roman Stadlhuber
Nov 13 '18 at 13:57





@Aluan Haddad When I try to use import or require it cannot find the module until I specifically enter the path to each file. Moreover, it seems like you don't create an instance of an exported module. The App.js file uses, for instance, "process.argv" which is used to capture input from the terminal (I guess) which leads me to thinking that I have to use this module via terminal and I don't know how to do this. The instructions on the node modules page aren't clear enough to me.

– Roman Stadlhuber
Nov 13 '18 at 13:57












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53281840%2fhow-to-use-certain-node-module%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53281840%2fhow-to-use-certain-node-module%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Florida Star v. B. J. F.

Danny Elfman

Lugert, Oklahoma