Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

TypeError when i use it in a vue project #184

Closed
Littleor opened this issue Jun 29, 2019 · 3 comments
Closed

TypeError when i use it in a vue project #184

Littleor opened this issue Jun 29, 2019 · 3 comments

Comments

@Littleor
Copy link

my code :
const parser = require('xml2json');

it shows :
Uncaught TypeError: Cannot read property 'indexOf' of undefined

@p3x-robot
Copy link
Contributor

is it a server side rendering in vue? xml2json is binary, it does not work in a browser.

@p3x-robot
Copy link
Contributor

i think https://www.npmjs.com/package/xml-js is pure js, that might work in a browser

@Littleor
Copy link
Author

I have use 'x2js' to solve it,thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants