Support npm subflow modules

This commit is contained in:
Nick O'Leary
2020-08-28 16:36:11 +01:00
committed by Nick O'Leary
parent 6e1466e411
commit 9a660f3fe9
13 changed files with 499 additions and 254 deletions

View File

@@ -158,13 +158,10 @@ async function loadNodeTemplate(node) {
}
return node
}).catch(err => {
node.types = [];
if (err.code === 'ENOENT') {
if (!node.types) {
node.types = [];
}
node.err = "Error: "+node.template+" does not exist";
} else {
// ENOENT means no html file. We can live with that. But any other error
// should be fatal
// node.err = "Error: "+node.template+" does not exist";
if (err.code !== 'ENOENT') {
node.types = [];
node.err = err.toString();
}