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

jest-cli version 0.5+ won't work with current version of Node; should require jest-cli <0.5 #4

Closed
jmrog opened this issue Sep 6, 2015 · 2 comments

Comments

@jmrog
Copy link

jmrog commented Sep 6, 2015

This isn't an issue with any of the code itself, but it's still an issue that I encountered while working through the book. Posting it here may help others. (It might be also be worth posting a correction to the book's text that makes jest-cli <0.5 a requirement.)

For the tests in Chapter 8, the book uses jest-cli version 0.4.18. However, the current version of jest-cli is 0.5.1, and version 0.5.1 is what will be installed if you enter the exact command presented in Chapter 8 (npm install –-save-dev jest-cli). The major problem here is that any version of jest-cli greater than 0.4 will not support the current version of Node.js (0.12), or any version below that (see this link for some discussion: jestjs/jest#243), and therefore the tests in the book will not work at all. The simplest solution, if you are using Node (and not io.js), is to force installation of jest-cli < 0.5, using a command like this:

npm install --save-dev jest-cli@^0.4

This will install a version of jest-cli >=0.4 and <0.5, and all should work from there.

@jmrog jmrog changed the title jest-cli tests don't work (without shim) for jest-cli version 0.5+ jest-cli version 0.5+ won't work with current version of Node; should require jest-cli <0.5 Sep 6, 2015
@fedosejev
Copy link
Owner

@jmrog thanks for your correction. I will improve this update: https://github.com/fedosejev/react-essentials/blob/master/updates.md#chapter-8-page-6

@jmrog
Copy link
Author

jmrog commented Sep 6, 2015

Oops! I missed that you posted that update. What you have there is fine, and should fix the issue I mentioned. This can be closed.

fedosejev added a commit that referenced this issue Sep 6, 2015
Apply suggested improvement: #4
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