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

快应用下 @tarojs/redux 报错 #4510

Open
ghost opened this issue Sep 23, 2019 · 1 comment
Open

快应用下 @tarojs/redux 报错 #4510

ghost opened this issue Sep 23, 2019 · 1 comment
Assignees
Labels
T-quickapp Target - 编译到快应用

Comments

@ghost
Copy link

ghost commented Sep 23, 2019

问题描述
官网默认模版下使用 tarojs/redux出现报错如下

index.js?f0ee:271 Uncaught TypeError: Class constructor Index cannot be invoked without 'new'
    at new Connect (VM210 index.js:276)
    at Object.createComponent (VM205 index.js:3175)
    at __scriptModule__ (index.ux?d18b:141)
    at eval (index.ux?498f:8)
    at ny (web.js:1)
    at r (web.js:1)
    at eval (index.ux?498f:7)
    at Object../src/pages/index/index.ux?uxType=page (index.js:376)
    at __webpack_require__ (index.js:23)
    at index.js:87
// ```js
// 代码放这里(前后的 "```" 有助 Mardown 整理代码格式和加入代码高亮)
// ```

// 提供完整可复现的代码和整理好代码格式,有助于我们快速定位问题,节省你我时间。
// 代码提供不全或代码格式混乱的 issues 【有可能被忽略】,烦请各位注意。

期望行为

报错信息
index.js?f0ee:271 Uncaught TypeError: Class constructor Index cannot be invoked without 'new'
at new Connect (VM210 index.js:276)
at Object.createComponent (VM205 index.js:3175)
at scriptModule (index.ux?d18b:141)
at eval (index.ux?498f:8)
at ny (web.js:1)
at r (web.js:1)
at eval (index.ux?498f:7)
at Object../src/pages/index/index.ux?uxType=page (index.js:376)
at webpack_require (index.js:23)
at index.js:87
版本信息

"@tarojs/async-await": "1.3.18",
"@tarojs/components": "1.3.18",
"@tarojs/components-qa": "1.3.18",
"@tarojs/redux": "1.3.18",
"@tarojs/redux-h5": "1.3.18",
"@tarojs/router": "1.3.17",
"@tarojs/taro": "1.3.17",
"@tarojs/taro-alipay": "1.3.17",
"@tarojs/taro-h5": "1.3.17",
"@tarojs/taro-quickapp": "^1.3.18",
"@tarojs/taro-swan": "1.3.17",
"@tarojs/taro-tt": "1.3.17",
"@tarojs/taro-weapp": "1.3.17",
补充信息
问题在 @tarojs/redux 包下
connect.js 的
connectComponent 方法编译后抛出错误,编译前src源码正常

@taro-bot
Copy link

taro-bot bot commented Sep 23, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-quickapp Target - 编译到快应用
Projects
None yet
Development

No branches or pull requests

2 participants