Difficulty to install node-red-contrib-xml-validate/xml-validate

When I try to install node-red-contrib-xml-validate/xml-validate I get the following error:

8 Feb 08:39:30 - [warn] ------------------------------------------------------
8 Feb 08:39:30 - [warn] [node-red-contrib-xml-validate/xml-validate] Error: Cannot find module '/usr/local/lib/node_modules/node-red/red/red'
Require stack:
- /home/ubuntu/.node-red/node_modules/node-red-contrib-xml-validate/xml-validate.js
- /usr/local/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/local/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/local/lib/node_modules/node-red/lib/red.js
- /usr/local/lib/node_modules/node-red/red.js

I tried both ways from the palette in node-red ui and from the with ```
npm install node-red-contrib-xml-validate


I installed java, as it as a dependency on it.

I do have all files listed in the require stack log...

As node-red-contrib-xml-validate was last updated 6 years, 1 month ago and there has been no response to the single issue raised last year, I think you will have to assume this node is abandoned.

You could try adding libxml-xsd to the setup tab on a function node and use something like this...

read file node --> function --> debug

function code...

var schema = libxmlXsd.parse(msg.payload); //schemaString loaded from file
var validationErrors = schema.validate(msg.documentString); //documentString passed in msg
msg.payload = validationErrors;
return msg; 

↑ untested ↑

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.