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

**URL:** <https://discourse.nodered.org/t/difficulty-to-install-node-red-contrib-xml-validate-xml-validate/57977>\
**Category:** General\
**Created:** [8 February 2022 08:52 UTC](https://discourse.nodered.org/t/difficulty-to-install-node-red-contrib-xml-validate-xml-validate/57977 "2022-02-08T08:52:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThibautRuy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thibautruy/32/28480_2.png) [@ThibautRuy](https://discourse.nodered.org/u/ThibautRuy)\
**Post date:** [8 February 2022 08:52 UTC](https://discourse.nodered.org/t/difficulty-to-install-node-red-contrib-xml-validate-xml-validate/57977/1 "2022-02-08T08:52:58Z")

</div>

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

```auto
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

```auto

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

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

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [8 February 2022 09:29 UTC](https://discourse.nodered.org/t/difficulty-to-install-node-red-contrib-xml-validate-xml-validate/57977/2 "2022-02-08T09:29:17Z")

</div>

As [node-red-contrib-xml-validate](https://github.com/alessh/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](https://www.npmjs.com/package/libxml-xsd) to the setup tab on a function node and use something like this...

read file node --\> function --\> debug

function code...

```auto
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 ↑_

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 April 2022 09:30 UTC](https://discourse.nodered.org/t/difficulty-to-install-node-red-contrib-xml-validate-xml-validate/57977/3 "2022-04-09T09:30:10Z")

</div>

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