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

TypeError undefined for chunk #305

Closed
RWOverdijk opened this issue Jun 27, 2017 · 1 comment
Closed

TypeError undefined for chunk #305

RWOverdijk opened this issue Jun 27, 2017 · 1 comment

Comments

@RWOverdijk
Copy link

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.

@calvinmetcalf
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants