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

自定义组件无法继承 AtComponent 组件。 #2369

Closed
liuweiGL opened this issue Mar 6, 2019 · 4 comments
Closed

自定义组件无法继承 AtComponent 组件。 #2369

liuweiGL opened this issue Mar 6, 2019 · 4 comments
Assignees

Comments

@liuweiGL
Copy link
Contributor

liuweiGL commented Mar 6, 2019

问题描述
在自定义组件继承了 Taro-UI 中的 AtComponent 组件,在 weapp 模式下编译正常,但是微信开发工具报错。

复现步骤

1. git clone [email protected]:liuweiGL/taro-issue-reproduce.git
2. npm install
3. npm start
4. 使用微信开发工具打开项目
5. 查看控制台 

期望行为
微信开发工具不报错,自定义组件工作正常。

报错信息

VM2680:1 thirdScriptError 
 sdk uncaught third Error 
 Unexpected token import 
 SyntaxError: Unexpected token import
console.error @ VM2680:1
(anonymous) @ WAService.js:1
(anonymous) @ WAService.js:1
e @ appservice?t=1551858416718:1630
window.onerror @ VM2680:1
VM2680:1 thirdScriptError 
 sdk uncaught third Error 
 module "npm/taro-ui/dist/weapp/index.js" is not defined 
 Error: module "npm/taro-ui/dist/weapp/index.js" is not defined
    at require (http://127.0.0.1:56439/appservice/__dev__/WAService.js:1:912710)
    at http://127.0.0.1:56439/appservice/__dev__/WAService.js:1:912460
    at http://127.0.0.1:56439/appservice/npm/taro-ui/dist/index.js:2:20
    at require (http://127.0.0.1:56439/appservice/__dev__/WAService.js:1:912851)
    at http://127.0.0.1:56439/appservice/__dev__/WAService.js:1:912460
    at http://127.0.0.1:56439/appservice/components/panel/index.js:23:15
    at require (http://127.0.0.1:56439/appservice/__dev__/WAService.js:1:912851)
    at <anonymous>:47:7
    at HTMLScriptElement.scriptLoaded (http://127.0.0.1:56439/appservice/appservice?t=1551858416718:1752:21)
    at HTMLScriptElement.script.onload (http://127.0.0.1:56439/appservice/appservice?t=1551858416718:1764:20)

系统信息

 Taro CLI 1.2.15 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 10.13.0 - D:\nodejs\node.EXE
      npm: 6.4.1 - D:\nodejs\npm.CMD

补充信息
暂无

@taro-bot
Copy link

taro-bot bot commented Mar 6, 2019

欢迎提交 Issue~

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

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

Good luck and happy coding~

@taro-bot
Copy link

taro-bot bot commented Mar 11, 2019

CC @luckyadam

@justrustc
Copy link

我也遇到这个问题了

@yuche
Copy link
Contributor

yuche commented Jul 16, 2019

close via 49a97e9

@yuche yuche closed this as completed Jul 16, 2019
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

4 participants