innocces / taro-hooks

Hooks Library for Taro
https://next-taro-hooks.pages.dev
MIT License
420 stars 35 forks source link

bug: plugin 中使用 @taro-hooks/shared 导致报错 #42

Closed fine54 closed 1 year ago

fine54 commented 1 year ago

版本

复现步骤

包管理使用的 pnpm,config/index.js => plugins 中添加 @taro-hooks/shared 启动即报错

你期望的现象?

正常启动

现有的现象?

启动后报错: (node:81484) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

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

github-actions[bot] commented 1 year ago

welcome discuss in wechat:

fine54 commented 1 year ago

补充一下细节: 使用的 Vue3,文档 Vue 教程上提到:建议您同时下载 @taro-hooks/shared 插件用于转换一些等同状态的 state 故添加此插件。

Plugins 内容有:['tarojs-router-next-plugin', '@dcasia/mini-program-tailwind-webpack-plugin/dist/taro', 'taro-plugin-pinia', '@tarojs/plugin-html', '@taro-hooks/plugin-vue', '@taro-hooks/shared']

github-actions[bot] commented 1 year ago

Hello @FinE54. In order to facilitate location and troubleshooting, we need you to provide a realistic example. You can create a taro project by clicking here and provide the GitHub warehouse address and reproduce examples.

你好 @FinE54, 为了方便定位和排查问题,我们需要你提供一个重现实例。你可以通过点击 此处 创建一个 Taro 项目并提供 GitHub 仓库地址和重现实例。

stale[bot] commented 1 year ago

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.