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

bug:使用useRouter的时候报错 #74

Open
viilon opened this issue Apr 29, 2024 · 3 comments
Open

bug:使用useRouter的时候报错 #74

viilon opened this issue Apr 29, 2024 · 3 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@viilon
Copy link

viilon commented Apr 29, 2024

版本

  • taro-hooks:2.0.11
  • taro:3.6.28
  • node:v20.8.0
  • OS:mac

复现步骤

<script setup lang="ts">
const [, {back}] = useRouter();
const onClickSubmitHandle = async () => {
   back();
}

</script>

现有的现象?

如代码所示,使用useRouter时会报错
页面【modules/xxxr/xxx]错误:
Error: module 'modules/customer-order/sub-vendors.js' is not defined, require args is './sub-vendors.js'

上面代码逻辑是我写在分包后的一个子包里,在主包使用的时候没有问题

复现 repo(最好可以提供一个复现的 repo)

@viilon viilon added the bug Something isn't working label Apr 29, 2024
Copy link

welcome discuss in wechat:

@innocces
Copy link
Owner

这个应该是 taro 那边的问题。建议去 taro 那边去建个 issue

Copy link

stale bot commented Jun 29, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants