Skip to content

TypeError undefined for chunk #305

Description

@RWOverdijk

I'm getting the following error:

/private/tmp/aurelia-orm/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:257
      if (typeof chunk !== 'string' && Object.getPrototypeOf(chunk) !== Buffer.prototype && !state.objectMode) {
                                              ^

TypeError: Cannot convert undefined or null to object
    at Function.getPrototypeOf (<anonymous>)
    at readableAddChunk (/private/tmp/aurelia-orm/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:257:47)
    at DestroyableTransform.Readable.push (/private/tmp/aurelia-orm/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:237:10)
    at DestroyableTransform.Transform.push (/private/tmp/aurelia-orm/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:146:32)
    at /private/tmp/aurelia-orm/node_modules/aurelia-tools/src/build.js:43:12
    at action (/private/tmp/aurelia-orm/node_modules/breeze-dag/lib/dag.js:93:5)
    at Queue.process (/private/tmp/aurelia-orm/node_modules/breeze-queue/lib/queue.js:174:5)
    at next (/private/tmp/aurelia-orm/node_modules/breeze-queue/lib/queue.js:182:12)
    at done (/private/tmp/aurelia-orm/node_modules/breeze-dag/lib/dag.js:102:7)
    at /private/tmp/aurelia-orm/node_modules/aurelia-tools/src/build.js:44:7
    at action (/private/tmp/aurelia-orm/node_modules/breeze-dag/lib/dag.js:93:5)
    at Queue.process (/private/tmp/aurelia-orm/node_modules/breeze-queue/lib/queue.js:174:5)
    at module.exports (/private/tmp/aurelia-orm/node_modules/breeze-dag/lib/dag.js:118:9)
    at DestroyableTransform.endStream [as _flush] (/private/tmp/aurelia-orm/node_modules/aurelia-tools/src/build.js:42:5)
    at DestroyableTransform.<anonymous> (/private/tmp/aurelia-orm/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:138:49)
    at Object.onceWrapper (events.js:293:19)

If I add the following line of code before the code on this line, everything works as expected:

if (!chunk) return

Never mind the lack of respect for coding style, it was just to test.

I assume my addition isn't needed, so I'm hoping you can tell me what's going on here. I have no idea.

Activity

  1. calvinmetcalf commented on Jun 27, 2017

    @calvinmetcalf
    Contributor

    this is fixed by nodejs/node#13760 so I think that should be in the next patch version which will be incorporated into this pretty soon after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions