Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SyntaxError: Unexpected token u #124

@skeggse

Description

@skeggse

I'm not sure what's causing this yet, apart from the obvious that JSON.parse is passed undefined. I'm not trying to do anything particularly fancy, I'll see if I can track it down or reduce it to a workable test-case.

Node v0.10.24 and v0.10.26.

undefined:1
undefined
^
SyntaxError: Unexpected token u
    at Object.parse (native)
    at unpack (/{REDACTED}/node_modules/axon/node_modules/amp-message/index.js:136:32)
    at decode (/{REDACTED}/node_modules/axon/node_modules/amp-message/index.js:83:15)
    at new Message (/{REDACTED}/node_modules/axon/node_modules/amp-message/index.js:35:37)
    at Parser.<anonymous> (/{REDACTED}/node_modules/axon/lib/sockets/sock.js:223:15)
    at Parser.EventEmitter.emit (events.js:95:17)
    at Parser._write (/{REDACTED}/node_modules/axon/node_modules/amp/lib/stream.js:91:16)
    at doWrite (_stream_writable.js:221:10)
    at writeOrBuffer (_stream_writable.js:211:5)
    at Parser.Writable.write (_stream_writable.js:180:11)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions