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

Unable to parse? #3

Open
awiley-coyote opened this issue Apr 6, 2022 · 1 comment
Open

Unable to parse? #3

awiley-coyote opened this issue Apr 6, 2022 · 1 comment

Comments

@awiley-coyote
Copy link

I am getting this error when trying to run this:
Unable to parse input json contents SyntaxError: Unexpected token { in JSON at position 105
at JSON.parse ()
at Object. (/home/hunter/Desktop/json-to-es-bulk/index.js:51:22)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
ReferenceError: exit is not defined
at Object. (/home/hunter/Desktop/json-to-es-bulk/index.js:55:5)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

command I am trying to run is node index.js -f ~/Documents/JSON_Files/Windows.System.DNSCache.json --index dnscache --type _doc

@mradamlacey
Copy link
Owner

Can you validate your input JSON (~/Documents/JSON_Files/Windows.System.DNSCache.json) is valid? Does it validate in a tool like https://jsonlint.com/ ?

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

No branches or pull requests

2 participants