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

TypeError: taro.defineComponent is not a function #3245

Open
qq237661704 opened this issue Feb 7, 2025 · 4 comments
Open

TypeError: taro.defineComponent is not a function #3245

qq237661704 opened this issue Feb 7, 2025 · 4 comments

Comments

@qq237661704
Copy link

NutUI 包名

@nutui/nutui-taro

NutUI 版本号

4.2.8

平台

weapp

重现链接

https://nutui.jd.com/jdt/#/zh-CN/guide/start-jdt

重现步骤

按照官方的示例步骤操作,然后编译个微信小程序版本。用微信开发者工具(最新版)打开。报错如图

Image

期望的结果是什么?

期望能正常显示,正常情况,应该有一个按钮

实际的结果是什么?

app.js错误:
TypeError: taro.defineComponent is not a function
at vendors.js?t=wechat&s=1738919558360&v=9160194f9cfec7c9ecc725858db3e0f9:210
at WASubContext.js?t=wechat&s=1738919558360&v=3.7.7:1
at _.runWith (WASubContext.js?t=wechat&s=1738919558360&v=3.7.7:1)
at q (WASubContext.js?t=wechat&s=1738919558360&v=3.7.7:1)
at n (WASubContext.js?t=wechat&s=1738919558360&v=3.7.7:1)
at taro.js?t=wechat&s=1738919558360&v=fd11144792d57b30fed4b8bc448c6b71:3
at WASubContext.js?t=wechat&s=1738919558360&v=3.7.7:1
at _.runWith (WASubContext.js?t=wechat&s=1738919558360&v=3.7.7:1)
at q (WASubContext.js?t=wechat&s=1738919558360&v=3.7.7:1)
at n (WASubContext.js?t=wechat&s=1738919558360&v=3.7.7:1)(env: Windows,mp,1.06.2412050; lib: 3.7.7)

环境信息

No response

其他补充信息

No response

@axiangcoding
Copy link

同样的问题

@thomas-void0
Copy link

我有个类似的报错,就trao官网的模板拉下来就不能用。很难评

Image

@YTT-TTY
Copy link

YTT-TTY commented Mar 11, 2025

是不是用的vite构建项目的?我用webpack构建就不出错,但是vite就不行

@zzq0324
Copy link

zzq0324 commented Mar 15, 2025

是不是用的vite构建项目的?我用webpack构建就不出错,但是vite就不行

用webpack构建可以打开,但是demo那边toast连文字都不显示出来了,你有遇到这个问题吗?

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

5 participants