-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Display a useful error when withDom
fails to find "jsdom".
#686
Conversation
if (e.message === "Cannot find module 'jsdom'") { | ||
console.error('[enzyme/withDom] Error: missing required module "jsdom"'); | ||
console.error('[enzyme/withDom] To fix this you must run:'); | ||
console.error('[enzyme/withDom] npm install jsdom -D'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's stick to --save-dev
rather than using the shortcuts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I didn't feel strongly either way.
@ljharb updated to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
it'd be great if you could rebase this down to one commit; if not, I can take care of it for you.
Sure I can rebase and squash it. |
c24aa58
to
ab2d91f
Compare
ab2d91f
to
aaeedcf
Compare
All set. |
Thanks! |
Lost a bunch of time on this today because I thought it was a compatibility issue around the new
[email protected]
release ...... instead of just my own error of forgetting to install
jsdom
in a new module. 🙀 🙀 🙀Hopefully this helps others avoid my mistake. Tried to make the message displayed to users as clear as possible. 💯 ✨ 👍 💪 😼
_