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

uni.requireNativePlugin is not a function #34

Closed
cxy-coder opened this issue Nov 18, 2021 · 9 comments
Closed

uni.requireNativePlugin is not a function #34

cxy-coder opened this issue Nov 18, 2021 · 9 comments

Comments

@cxy-coder
Copy link

在HBuilderX中编译是正常的也打开了微信开发者工具了,但是微信开发者工具中报错了
image

Originally posted by @cxy-coder in #9 (comment)

@tttao7
Copy link
Contributor

tttao7 commented Nov 18, 2021

请问是否最新的代码

@cxy-coder
Copy link
Author

是的,今天准备在新的项目中尝试使用2.0的库

@micro-bean
Copy link

micro-bean commented Dec 10, 2021

在App.vue的onLaunch方法中增加代码覆盖uni报错:
`// #ifndef APP-NVUE

uni.requireNativePlugin = () => {};

// #endif
`

@alamhubb
Copy link

alamhubb commented Dec 22, 2021

遇到了相同的问题,

我在 vue.config.js中添加了 transpileDependencies: ['@dcloudio/uni-ui', 'uview-ui'] 之后可以了

@alamhubb
Copy link

遇到了相同的问题,应该是个popup这个组件有关

我在 vue.config.js中添加了 transpileDependencies: ['@dcloudio/uni-ui', 'uview-ui'] 之后可以了

@lanyuzx
Copy link

lanyuzx commented May 16, 2024

vue3 中怎么解决

@alamhubb
Copy link

vue3 中怎么解决

一样的吧,我现在用的就是vue3

@lanyuzx
Copy link

lanyuzx commented May 16, 2024

vue3 中怎么解决

一样的吧,我现在用的就是vue3

使用vite脚手架创建的项目 没有 vue.config.js ,大佬报错几天了,求解决方案

@alamhubb
Copy link

Reference in new is

vite的叫vite.config.js|ts
没有可以自己创建一个

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

6 participants