Skip to content

Test fails: TypeError: Cannot read property 'length' of undefined #14

Description

@mscheper

So I really am just getting started with React, have zero experience with Webpack, and I'm feeling kinda rusty with NodeJS, so forgive me if I'm doing something ignorant. But I followed the instructions in the README file, and got the following error when I ran the tests:

> react-way-getting-started@1.0.0 test /(my-parent)/react-way-getting-started
> jest

Using Jest CLI v0.4.19
 FAIL  src/app/components/__tests__/Cart.spec.js
TypeError: Cannot read property 'length' of undefined
  at maybeReadMore_ (_stream_readable.js:438:18)
  at /(my-parent)/react-way-getting-started/node_modules/jest-cli/src/lib/FakeTimers.js:342:7
  at nextTickCallbackWith0Args (node.js:420:9)
  at process._tickCallback (node.js:349:13)

/(my-parent)/react-way-getting-started/node_modules/jest-cli/node_modules/node-worker-pool/Worker.js:106
    throw new Error('Received unexpected data from child process: ' + data);
    ^

Error: Received unexpected data from child process: {
  "error": "TypeError: Cannot read property 'length' of undefined\n  at onwriteDrain (_stream_writable.js:362:12)\n  at afterWrite (_stream_writable.js:352:5)\n  at /(my-parent)/react-way-getting-started/node_modules/jest-cli/src/lib/FakeTimers.js:342:7\n  at nextTickCallbackWith0Args (node.js:420:9)\n  at Immediate._tickCallback [as _onImmediate] (node.js:349:13)\n  at processImmediate [as _immediateCallback] (timers.js:383:17)\n"
}

  at Worker._onStdout (/(my-parent)/react-way-getting-started/node_modules/jest-cli/node_modules/node-worker-pool/Worker.js:106:11)
  at emitOne (events.js:77:13)
  at Socket.emit (events.js:169:7)
  at readableAddChunk (_stream_readable.js:153:18)
  at Socket.Readable.push (_stream_readable.js:111:10)
  at Pipe.onread (net.js:536:20)

npm ERR! Test failed.  See above for more details.

I'm using node v4.5.0 and webpack 1.13.2 under Mint 17.

Activity

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