-
-
Notifications
You must be signed in to change notification settings - Fork 332
Open
Labels
PendingPending to be confirmed by user/author for some check/update/implementationPending to be confirmed by user/author for some check/update/implementation
Description
- Are you running the latest version?
- Have you included sample input, output, error, and expected output?
- Have you checked if you are using correct configuration?
- Did you try online tool?
Description
Input
I tried creating a validator function using the XMLValidator.validate method, however I'm getting a circular dependency warning when I try to run the code.
Code
const { XMLValidator } = require('fast-xml-parser');
const isValidXML = (xml) => {
const validXML = XMLValidator.validate(xml);
if (validXML.err) {
throw new Error('Invalid XML data', validXML);
}
return validXML;
};
Output
(node:7131) Warning: Accessing non-existent property 'splice' of module exports inside circular dependency
at emitCircularRequireWarning (node:internal/modules/cjs/loader:755:11)
at Object.get (node:internal/modules/cjs/loader:771:5)
at Object.<anonymous> (/validate-xml.js:1:26)
at Module._compile (node:internal/modules/cjs/loader:1165:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
at Module.load (node:internal/modules/cjs/loader:1043:32)
at Function.Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1067:19)
at require (node:internal/modules/cjs/helpers:103:18)
expected data
Code should run without errors
Would you like to work on this issue?
- Yes
- No
Bookmark this repository for further updates. Visit SoloThought to know about recent features.
Metadata
Metadata
Assignees
Labels
PendingPending to be confirmed by user/author for some check/update/implementationPending to be confirmed by user/author for some check/update/implementation