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

TypeError: Cannot read property '.ts' of undefined #22

Closed
van-chin opened this issue May 25, 2021 · 4 comments
Closed

TypeError: Cannot read property '.ts' of undefined #22

van-chin opened this issue May 25, 2021 · 4 comments

Comments

@van-chin
Copy link

image

报错如上图 是 mockPath 参数 设置有问题么?

@ralfsqual
Copy link

这个问题我也遇到了 目前退回了2.5.0。 貌似是2.5.2中有个地方回去取__require.extensions[xxxx], 这个__require是个function。 __require.extensions必然是个undefined。

@van-chin
Copy link
Author

这个问题我也遇到了 目前退回了2.5.0。 貌似是2.5.2中有个地方回去取__require.extensions[xxxx], 这个__require是个function。 __require.extensions必然是个undefined。

指定 mockPath 对当前文件的 相对路径 可以让错误消失

@anncwb anncwb closed this as completed in d5ac0d6 May 25, 2021
@anncwb anncwb reopened this May 25, 2021
@anncwb
Copy link
Collaborator

anncwb commented May 25, 2021

可以暂时还原回2.5.0

@van-chin
Copy link
Author

@anncwb 2.5.3 已经解决此问题了哇 我更新到2.5.3 没有错误了也可以正常 进行mock 👍

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

3 participants