Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular Dependency Error While trying to validate xml #624

Open
4 of 6 tasks
captbilard opened this issue Nov 14, 2023 · 3 comments
Open
4 of 6 tasks

Circular Dependency Error While trying to validate xml #624

captbilard opened this issue Nov 14, 2023 · 3 comments
Labels
Pending Pending to be confirmed by user/author for some check/update/implementation

Comments

@captbilard
Copy link

  • 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.

Copy link

We're glad you find this project helpful. We'll try to address this issue ASAP. You can vist https://solothought.com to know recent features. Don't forget to star this repo.

@amitguptagwl amitguptagwl added the Pending Pending to be confirmed by user/author for some check/update/implementation label Nov 22, 2023
@amitguptagwl
Copy link
Member

Can you please tell what version of the library you're using?

@captbilard
Copy link
Author

@amitguptagwl version 4.3.2. I believe that's the latest as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending Pending to be confirmed by user/author for some check/update/implementation
Projects
None yet
Development

No branches or pull requests

2 participants