instant
instant
  • 发布:2022-02-25 18:18
  • 更新:2023-09-28 11:06
  • 阅读:3385

【报Bug】vue3中,uni_module里的组件不会自动引入

分类:uni-app

产品分类: uniapp/小程序/微信

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win10

HBuilderX类型: 正式

HBuilderX版本号: 3.3.12

第三方开发者工具版本号: 最新

基础库版本号: 最新

项目创建方式: HBuilderX

操作步骤:

插件市场中

预期结果:

可以和vue2一样自动引入

实际结果:

不会引入

bug描述:

vue3中,uni_module里的组件不会自动引入,切回vue2可以

2022-02-25 18:18 负责人:无 分享
已邀请:
DCloud_UNI_Anne

DCloud_UNI_Anne

哪个插件?

  • instant (作者)

    都不行,自己建的,或者uni的,比如

    https://ext.dcloud.net.cn/plugin?id=23

    2022-02-25 19:58

  • DCloud_UNI_Anne

    回复 instant: 测试正常,你新建空项目导入试下

    2022-02-25 20:41

  • instant (作者)

    回复 DCloud_UNI_Anne: 我建了个空项目,里面只引了我用的组件库,vue2正常,vue3不行,代码zip在二楼回复附件

    2022-02-27 12:18

instant

instant (作者)

h5模式下,vue2可以,vue3不行,报错

       [Vue warn]: Failed to resolve component: n-cell  
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.   
 at <Index>  
at <AsyncComponentWrapper>  
at <PageBody>  
at <Page>  
at <Anonymous>  
at <Layout>  
at <App>  

       [Vue warn]: Failed to resolve component: n-list  
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.   
 at <Index>  
at <AsyncComponentWrapper>  
at <PageBody>  
at <Page>  
at <Anonymous>  
at <Layout>  
at <App>  

       [Vue warn]: Failed to resolve component: n-page  
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.   
 at <Index>  
at <AsyncComponentWrapper>  
at <PageBody>  
at <Page>  
at <Anonymous>  
at <Layout>  
at <App>
DCloud_UNI_Anne

DCloud_UNI_Anne

nvue组件引入问题已记录后续优化,已加分,感谢您的反馈!

  • l***@qq.com

    这应该不是nvue组件的问题吧,我引入uni-forms也报错了~

    2022-06-11 17:57

  • l***@qq.com

    "scripts": {

    "dev:h5": "uni",

    "dev:mp-weixin": "uni -p mp-weixin",

    "build:h5": "uni build",

    "build:mp-weixin": "uni build -p mp-weixin"

    },

    "dependencies": {

    "@dcloudio/uni-app": "3.0.0-alpha-3000020210521001",

    "@dcloudio/uni-components": "3.0.0-alpha-3000020210521001",

    "@dcloudio/uni-h5": "3.0.0-alpha-3041520220610001",

    "@dcloudio/uni-mp-weixin": "3.0.0-alpha-3041520220610001",

    "pinia": "^2.0.14",

    "vue": "3.2.33",

    "vue-i18n": "^9.1.9"

    },

    "devDependencies": {

    "@dcloudio/types": "^2.6.11",

    "@dcloudio/uni-automator": "3.0.0-alpha-3040820220424001",

    "@dcloudio/uni-cli-shared": "3.0.0-alpha-3041520220610001",

    "@dcloudio/uni-shared": "3.0.0-alpha-3041520220610001",

    "@dcloudio/vite-plugin-uni": "3.0.0-alpha-3041520220610001",

    "@types/node": "^17.0.42",

    "less": "^4.1.3",

    "sass": "^1.52.3",

    "typescript": "^4.7.3",

    "vite": "^2.9.9"

    }

    2022-06-11 18:09

  • 高级CV

    优化好了吗?cli 创建的工程好像就是不能自动引入

    2022-07-29 14:02

7***@qq.com

7***@qq.com

执行了下: sudo npx @dcloudio/uvm alpha
我执行了上面的命令后, 在运行项目后! 我也遇到了同样的问题,
请问这个问题解决了吗?

7***@qq.com

7***@qq.com

{
"name": "uni-preset-vue",
"version": "0.0.0",
"scripts": {
"dev:app": "uni -p app",
"dev:custom": "uni -p",
"dev:h5": "uni",
"dev:h5:ssr": "uni --ssr",
"dev:mp-alipay": "uni -p mp-alipay",
"dev:mp-baidu": "uni -p mp-baidu",
"dev:mp-kuaishou": "uni -p mp-kuaishou",
"dev:mp-lark": "uni -p mp-lark",
"dev:mp-qq": "uni -p mp-qq",
"dev:mp-toutiao": "uni -p mp-toutiao",
"dev:mp-weixin": "uni -p mp-weixin",
"dev:quickapp-webview": "uni -p quickapp-webview",
"dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
"dev:quickapp-webview-union": "uni -p quickapp-webview-union",
"build:app": "uni build -p app",
"build:custom": "uni build -p",
"build:h5": "uni build",
"build:h5:ssr": "uni build --ssr",
"build:mp-alipay": "uni build -p mp-alipay",
"build:mp-baidu": "uni build -p mp-baidu",
"build:mp-kuaishou": "uni build -p mp-kuaishou",
"build:mp-lark": "uni build -p mp-lark",
"build:mp-qq": "uni build -p mp-qq",
"build:mp-toutiao": "uni build -p mp-toutiao",
"build:mp-weixin": "uni build -p mp-weixin",
"build:quickapp-webview": "uni build -p quickapp-webview",
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
"build:quickapp-webview-union": "uni build -p quickapp-webview-union"
},
"dependencies": {
"@dcloudio/uni-app": "^3.0.0-alpha-3060120220907002",
"@dcloudio/uni-app-plus": "^3.0.0-alpha-3060120220907002",
"@dcloudio/uni-components": "^3.0.0-alpha-3060120220907002",
"@dcloudio/uni-h5": "^3.0.0-alpha-3060120220907002",
"@dcloudio/uni-mp-alipay": "^3.0.0-alpha-3060120220907002",
"@dcloudio/uni-mp-baidu": "^3.0.0-alpha-3060120220907002",
"@dcloudio/uni-mp-kuaishou": "^3.0.0-alpha-3060120220907002",
"@dcloudio/uni-mp-lark": "^3.0.0-alpha-3060120220907002",
"@dcloudio/uni-mp-qq": "^3.0.0-alpha-3060120220907002",
"@dcloudio/uni-mp-toutiao": "^3.0.0-alpha-3060120220907002",
"@dcloudio/uni-mp-weixin": "^3.0.0-alpha-3060120220907002",
"@dcloudio/uni-quickapp-webview": "^3.0.0-alpha-3060120220907002",
"crypto-js": "^4.1.1",
"default-passive-events": "^2.0.0",
"md5": "^2.3.0",
"text-encoding": "^0.7.0",
"vue": "^3.2.39",
"vue-i18n": "^9.2.2",
"vuex": "^4.0.2"
},
"devDependencies": {
"@dcloudio/types": "^3.0.15",
"@dcloudio/uni-automator": "^3.0.0-alpha-3060120220907002",
"@dcloudio/uni-cli-shared": "^3.0.0-alpha-3060120220907002",
"@dcloudio/uni-stacktracey": "^3.0.0-alpha-3060120220907002",
"@dcloudio/vite-plugin-uni": "^3.0.0-alpha-3060120220907002",
"sass": "^1.54.8",
"vite": "^2.9.15"
}
}

7***@qq.com

7***@qq.com

楼主解决了吗

有色如你

有色如你

楼主解决了吗

要回复问题请先登录注册