jestjs/jest
在 GitHub 查看Jest should resolve its dependencies from its own location rather than rootDir
Open
#5,913 创建于 2018年4月3日
ConfirmedHelp WantedPinned
仓库指标
- Star
- (45,361 star)
- PR 合并指标
- (平均合并 11天 22小时) (30 天内合并 11 个 PR)
描述
Create React App users bumped into this issue recently. A third party package started depending on jest-validate, and that caused npm to hoist jest-environment-node to the top of the app tree. Unfortunately, Jest resolves environment package from the project root instead of from its own Node module location so as a result, it loads the wrong (hoisted) jest-environment-node.
I think the jest package should resolve any own dependencies from its own location (just like Node resolution works) rather than from the project root folder.