[jest-resolve] Prevent default resolver failure when potential resolution directory does not exist (#4483)
[jest-resolve] Prevent default resolver failure when potential resolution directory does not exist (#4483)

Summary: A recent change to take precedence of NODE_PATH for module resolution (https://github.com/facebook/jest/pull/4453) made this issue more likely to occur since NODE_PATH could contain non-existent directories. While this could have occurred prior to the change, it was less likely since it is more common that modules are in local `node_modules`.

Either way, non-existent directories should be treated the same way as non-existent files during module resolution. The equivalent case for `statSync` returning `ENOENT` for files is `ENOTDIR` for directories. We may want to add `ENOTDIR` to `isFile` as well.

Test Plan:
1. `yarn test`
2. Link cli into another project, set NODE_PATH to non-existent directories, no longer see cryptic `Cannot find module` error. Instead, it now resolves to a potential path further down the path list.
bookman25/jest,bookman25/jest,facebook/jest,ide/jest,cpojer/jest,cpojer/jest,ide/jest,cpojer/jest,ide/jest,facebook/jest,bookman25/jest,facebook/jest