innocces / taro-hooks

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

bug: 微信小程序无法运行 #50

Closed BaoXianSheng closed 1 year ago

BaoXianSheng commented 1 year ago

版本

复现步骤

yarn dev:weapp

你期望的现象?

运行成功

现有的现象?

运行失败 h5端可以正常运行

resolve 'react' in 'D:\workplace\taro\hooks-demo\node_modules\@taro-hooks\plugin-react\dist' Parsed request is a module using description file: D:\workplace\taro\hooks-demo\node_modules\@taro-hooks\plugin-react\package.json (relative path: ./dist) aliased with mapping 'react': 'cjs/react.production.min.js' to 'cjs/react.production.min.js'
Parsed request is a module using description file: D:\workplace\taro\hooks-demo\node_modules\@taro-hooks\plugin-react\package.json (relative path: ./dist) Field 'browser' doesn't contain a valid alias configuration resolve as module D:\workplace\taro\hooks-demo\node_modules\@taro-hooks\plugin-react\dist\node_modules doesn't exist or is not a directory looking for modules in D:\workplace\taro\hooks-demo\node_modules\@taro-hooks\plugin-react\node_modules D:\workplace\taro\hooks-demo\node_modules\@taro-hooks\plugin-react\node_modules\cjs doesn't exist D:\workplace\taro\hooks-demo\node_modules\@taro-hooks\node_modules doesn't exist or is not a directory D:\workplace\taro\hooks-demo\node_modules\node_modules doesn't exist or is not a directory looking for modules in D:\workplace\taro\hooks-demo\node_modules D:\workplace\taro\hooks-demo\node_modules\cjs doesn't exist D:\workplace\taro\node_modules doesn't exist or is not a directory D:\workplace\node_modules doesn't exist or is not a directory D:\node_modules doesn't exist or is not a directory

→ Watching... [2023/7/27 12:05:19]

node:internal/process/promises:288 triggerUncaughtException(err, true / fromPromise /); ^

[UnhandledPromiseRejection: 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(). The promise rejected with the reason "[object Array]".] { code: 'ERR_UNHANDLED_REJECTION' }

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

github-actions[bot] commented 1 year ago

welcome discuss in wechat:

innocces commented 1 year ago

是使用哪个模版创建的? 2x ?

BaoXianSheng commented 1 year ago

是使用哪个模版创建的? 2x ?

好像是用@什么开头,2x也是这个问题,我刚才又试试了taro 3.6.10内置的模板都有问题,