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

Explain "Unexpected end of input" in combiner adventure #113

Open
marlun opened this issue Feb 12, 2015 · 0 comments
Open

Explain "Unexpected end of input" in combiner adventure #113

marlun opened this issue Feb 12, 2015 · 0 comments

Comments

@marlun
Copy link

marlun commented Feb 12, 2015

I had almost the whole solution for the combiner adventure but was getting

SyntaxError: Unexpected end of input
  at Object.parse (native)
  at Stream.write (/Users/marlun/Code/stream-adventure/combiner.js:14:18)
  at Stream.stream.write (/Users/marlun/Code/stream-adventure/node_modules/through/index.js:26:11)
  at Stream.ondata (stream.js:32:26)
  at emitOne (events.js:75:13)
  at Stream.emit (events.js:150:7)
  at drain (/Users/marlun/Code/stream-adventure/node_modules/through/index.js:36:16)
  at Stream.stream.queue.stream.push (/Users/marlun/Code/stream-adventure/node_modules/through/index.js:45:5)
  at emit (/Users/marlun/Code/stream-adventure/node_modules/split/index.js:36:14)
  at Stream.<anonymous> (/Users/marlun/Code/stream-adventure/node_modules/split/index.js:59:7)

Could someone please explain to me how one would debug the situation to figure out that what is needed is

if (line.length === 0) return;

on top of the through/write function?

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

1 participant