Skip to content

页面编译后实时更新出现TypeError: Super expression must either be null or a function,注明第一次的时候是正常的,重新编译后也是正常的就是刷新就出现问题了 #2704

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

Closed
curryhh opened this issue Apr 8, 2019 · 22 comments
Assignees

Comments

@curryhh
Copy link

curryhh commented Apr 8, 2019

报错信息
20190408225233
20190408225240

@taro-bot
Copy link

taro-bot bot commented Apr 8, 2019

欢迎提交 Issue~

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

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

Good luck and happy coding~

@yuche yuche added the H5 label Apr 9, 2019
@taro-bot
Copy link

taro-bot bot commented Apr 9, 2019

CC @Littly

@taro-bot taro-bot bot assigned Littly Apr 9, 2019
@beimuaihui
Copy link

我的h5页面修改后也经常出现这个问题

@curryhh
Copy link
Author

curryhh commented Apr 12, 2019

@beimuaihui 对对 我也是h5的时候发现的,你有没有解决方式

@SpinachMiss
Copy link

H5 很严格,你没有 export default

@curryhh
Copy link
Author

curryhh commented Apr 12, 2019

@SpinachMiss
应该不是的 1.生成没问题的,刷新之后才会有问题2.我有注意export default 跟import,如果我没这个的话taro生成的时候是有问题的直接报错在控制台的

@Littly
Copy link
Contributor

Littly commented Apr 16, 2019

看这个报错日志,应该是页面文件缺少default导出导致的。在taro的路由处理中,default导出是必需品

.then(({ default: component }) => {
if (!component) {
throw Error(`Received a falsy component for route "${props.path}". Forget to export it?`)
}
const WrappedComponent = createWrappedComponent(component)
this.wrappedComponent = WrappedComponent
this.forceUpdate()
}).catch((e) => {

@SeptemberMaples
Copy link

我刚刚更新taro也出现同样错误。 发现是taro-ui没有更新,更新到最新版,并根据文档引入.scss文件。解决了

@curryhh
Copy link
Author

curryhh commented May 23, 2019

我刚刚更新taro也出现同样错误。 发现是taro-ui没有更新,更新到最新版,并根据文档引入.scss文件。解决了

谢谢了 我有时候出现那个问题而已,项目已经结束了

@kenphil
Copy link

kenphil commented Jun 4, 2019

看这个报错日志,应该是页面文件缺少default导出导致的。在taro的路由处理中,default导出是必需品

.then(({ default: component }) => {
if (!component) {
throw Error(`Received a falsy component for route "${props.path}". Forget to export it?`)
}
const WrappedComponent = createWrappedComponent(component)
this.wrappedComponent = WrappedComponent
this.forceUpdate()
}).catch((e) => {

我也出现了这个问题,但是组件导出都有default,除了一些utils

@LeleCao
Copy link

LeleCao commented Aug 6, 2019

我也出现这个问题了,h5页面,有人知道怎么解决吗,taro兼容性也太弱了,开源了让我们做小白鼠吗

@Littly
Copy link
Contributor

Littly commented Aug 12, 2019

没有复现,麻烦提供可以稳定复现的仓库吧。

@curryhh
Copy link
Author

curryhh commented Aug 12, 2019

没有复现,麻烦提供可以稳定复现的仓库吧。

你好,https://github.com/curryhh/taro-douban 这个项目就是,编译h5后是正常的,但是一改动之后就出问题了

@useryechen
Copy link

是经常会出现这个问题,但是我重新ctrl+s保存下 浏览器自动刷新一下 又自己好了

@taro-bot
Copy link

taro-bot bot commented Aug 12, 2019

Hello~

您的问题我们无法复现。如果有空的话还请拔冗提供一个简单的复现 demo,否则这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

@Littly
Copy link
Contributor

Littly commented Aug 12, 2019

没有复现,麻烦提供可以稳定复现的仓库吧。

你好,curryhh/taro-douban 这个项目就是,编译h5后是正常的,但是一改动之后就出问题了

ok 我试下

@taro-bot
Copy link

taro-bot bot commented Nov 13, 2019

Hello~

您的问题楼上已经有了确切的回答,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

@taro-bot taro-bot bot removed the to be closed label Dec 3, 2019
@taro-bot taro-bot bot closed this as completed Dec 3, 2019
@beimuaihui
Copy link

ubuntu + taro1.3.25 + redux ;
我的估计是编译后显示编译成功,但在temp目录下面编译后的文件内容为空,我现在是每次都要多点几次保存,才能确保存编译生成文件有内容

@lukeymyuan
Copy link

我也有这个问题, h5 有人有解答吗

@lzd358194530
Copy link

lzd358194530 commented May 7, 2020

今天刚创建的项目 发现这个问题
ps: 发现写法有误 在 jsx 里面用了双引号

@younthu
Copy link
Contributor

younthu commented Feb 8, 2021

我也遇到过这种问题。2.2.11升级到3.0.

我把import {Component} from @taro/components 改成 import {Component} from react, 这个问题就消失了。

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