I have an embarrassing problem.
I have built parsers before with lex and yacc.
I have built a parser in pegjs and tested it on the web version. All good.
My target environment will be node-red but I wanted to test it running node from the console.
This is my first project in javascript.
I have a sheltered exposure to the language use in node-red.
I am entirely vague, however, on the nuisances of importing into nodejs.
Starting from the exported parser, with module.exports as the parser variable, what should my import declaration be for the node console please?
I have tried various options but all seem to raise errors.
I am assuming that will be the same then for node-red?
Cheers,
A