mapbox / mapbox/wikimama

SyntaxError: Unexpected end of JSON input

Open
#12 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
8
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Error:

```shell
$ node batch-match.js --file input.csv
undefined:1

SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at ChildProcess. (/private/var/www/github/wikimama/batch-match.js:92:31)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at maybeClose (internal/child_process.js:899:16)
at Socket. (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at Pipe._handle.close [as _onclose] (net.js:513:12)
```

`input.csv`:
```shell
Hyderabad,17.3616227,78.4747305,Q1361,25,30
```

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with `node batch-match.js --file input.csv` using the supplied CSV, then inspect `batch-match.js` at line 92, where the stack trace reports `JSON.parse`. Trace the child-process output to determine why the parsed JSON is empty or incomplete; done means the reported failure is resolved or produces an actionable error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.