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

3.2.13版本 开发小程序插件,编译报错 #9610

Closed
tongpang opened this issue Jun 28, 2021 · 1 comment · Fixed by #10016 or #10038 · May be fixed by laozhudetui/taro#2
Closed

3.2.13版本 开发小程序插件,编译报错 #9610

tongpang opened this issue Jun 28, 2021 · 1 comment · Fixed by #10016 or #10038 · May be fixed by laozhudetui/taro#2
Assignees
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Milestone

Comments

@tongpang
Copy link

相关平台

微信小程序

复现仓库

https://github.com/tongpang/taro-init
小程序基础库: 2.17.3
使用框架: React

复现步骤

按照文档步骤初始化项目

$ npm install -g @tarojs/cli

$ taro init myApp

框架:React

使用TypeScript

CSS预处理器:Less

模板源:Github

模板:wxplugin

项目创建成功之后,使用taro build --plugin weapp --watch启动项目

list.tsx文件修改代码,比如说输入一个空格,保存,编译报错

期望结果

编译成功

实际结果

⚠️ 编译警告. 2021/6/28 下午4:02:37

./src/plugin/pages/list/list.tsx 10:49-58
"export 'default' (imported as 'component') was not found in '@tarojs/taro-loader/lib/native-component?{"framework":"react","name":"plugin/pages/list/list","prerender":false,"config":{"plugin/pages/list/list.config":{"content":{},"p
ath":"D:\projects\chat-wx-app\src\plugin\pages\list\list.config.ts"},"plugin/components/avatar/avatar.config":{"content":{},"path":"D:\projects\chat-wx-app\src\plugin\components\avatar\avatar.config.ts"}},"runtimePath"
:"@tarojs/plugin-platform-weapp/dist/runtime"}!../../../../node_modules/babel-loader/lib/index.js!./list.tsx'

微信开发工具里面的报错

TypeError: Cannot read property 'render' of undefined
at isClassComponent (.._src_dsl_react.ts:21)
at Entry.mount (.._src_dsl_react.ts:391)
at qi.attached (.._src_dsl_react.ts:462)
at i.safeCallback (VM601 WAService.js:2)
at i.call (VM601 WAService.js:2)
at t (VM601 WAService.js:2)
at f (VM601 WAService.js:2)
at Function.l.pretendAttached (VM601 WAService.js:2)
at Module.To (VM601 WAService.js:2)
at Cn (VM601 WAService.js:2)(env: Windows,mp,1.05.2105170; lib: 2.17.3)

环境信息

� Taro v3.2.13


  Taro CLI 3.2.13 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 14.16.1 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.10 - C:\Users\Administrator\AppData\Roaming\npm\yarn.CMD
      npm: 6.14.12 - C:\Program Files\nodejs\npm.CMD

@BinZhiZhu
Copy link

你好,这个报错是在3.3.3版本修复了吗?我现在3.3.1还是有这个报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
4 participants