news 2026/5/20 8:13:40

前端智能化场景解决方案UI库matechat,如何安装环境项目

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
前端智能化场景解决方案UI库matechat,如何安装环境项目

MateChat / Angular

前端智能化场景解决方案UI库,轻松构建你的AI应用。已服务于华为内部多个应用智能化改造,并助力CodeArts、InsCode AI IDE等智能化助手搭建。

特性

  • 面向智能化场景组件库
  • 开箱即用
  • 多场景匹配
  • 多主题适配

🖥️ 快速开始

1. 安装

如果你还没有新建项目,可以使用 Angular CLI 首先初始化一个angular项目:

$ npm install-g @angular/cli@cli@20.3$ ngnewmatechat-demo $ npm i @matechat/ng




错误解决:

npm error codeERESOLVEnpm errorERESOLVEunable to resolve dependency tree npm error npm error While resolving:matechat-demo@0.0.0npm error Found:@angular/common@21.0.4npm error node_modules/@angular/common npm error @angular/common@"^21.0.0"fromthe root project npm error npm error Could not resolve dependency:npm error peer @angular/common@"^20.3.0"from@matechat/ng@20.1.0npm error node_modules/@matechat/ng npm error @matechat/ng@"*"fromthe root project npm error npm error Fix the upstream dependency conflict,or retry npm errorthiscommandwith--force or--legacy-peer-deps npm error to accept anincorrect(and potentially broken)dependency resolution.npm error npm error npm error For a full report see:

根据错误信息,npm ERR! ERESOLVE unable to resolve dependency tree 是由于依赖冲突导致的。具体来说,项目中 @angular/common 版本为 21.0.4,而 @matechat/ng 需要 @angular/common 的版本为 20.3.0,存在版本不兼容问题。以下是解决方案:

手动降级 Angular 版本,修改 package.json,将 @angular/common 版本降级到 20.3.0:

"dependencies":{"@angular/common":"20.3.0"}

但是手动降级后,其它的都是高版本报错:

npm error codeERESOLVEnpm errorERESOLVEunable to resolve dependency tree npm error npm error While resolving:matechat-demo@0.0.0npm error Found:@angular/core@21.0.4npm error node_modules/@angular/core npm error @angular/core@"^21.0.0"fromthe root project npm error npm error Could not resolve dependency:npm error peer @angular/core@"20.3.0"from@angular/common@20.3.0npm error node_modules/@angular/common npm error @angular/common@"20.3.0"fromthe root project npm error npm error Fix the upstream dependency conflict,or retry npm errorthiscommandwith--force or--legacy-peer-deps npm error to accept anincorrect(and potentially broken)dependency resolution.npm error npm error npm error For a full report see:


解决方案:

$ npm install-g @angular/laster 更换为 $ npm install-g @angular/cli@cli@20.3

MateChat/Angular是一个面向智能化场景的UI组件库,已成功应用于华为内部多个AI应用的改造。其特性包括开箱即用、多场景匹配和多主题适配。安装时若出现npm依赖冲突(如Angular版本不兼容),可通过降级到@angular/cli@20.3版本解决。

具体步骤为:

  • 1)使用指定版本初始化项目;
  • 2)安装@matechat/ng组件库。

该方案有效解决了@angular/common与@matechat/ng之间的版本冲突问题。

MateChat:https://gitcode.com/DevCloudFE/MateChat
MateChat官网:https://matechat.gitcode.com
DevUI官网:https://devui.design/home

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/5/19 10:54:14

把手教你用工具一键生成小红书干货类笔记

你是不是也经常为写小红书笔记头疼?想发干货内容,却卡在标题没吸引力、正文逻辑乱、配图不会做……甚至花了一两个小时,发出去阅读量还不过千😭 我以前也是这样。每天憋一篇笔记,光排版加修图就折腾半天,结…

作者头像 李华
网站建设 2026/5/19 11:50:42

如何快速掌握DuiLib_Ultimate:Windows桌面应用开发的终极指南

如何快速掌握DuiLib_Ultimate:Windows桌面应用开发的终极指南 【免费下载链接】DuiLib_Ultimate DuiLib_Ultimate 是深耕 Windows 软件UI开发的利器, 以轻量化、高性能、易扩展 为核心,专为 Windows 平台打造极致桌面应用体验而生。 项目地…

作者头像 李华
网站建设 2026/5/19 11:50:42

高效渲染神器:Go语言unrolled/render的终极指南

高效渲染神器:Go语言unrolled/render的终极指南 【免费下载链接】render Go package for easily rendering JSON, XML, binary data, and HTML templates responses. 项目地址: https://gitcode.com/gh_mirrors/ren/render 在Go语言Web开发中,数据…

作者头像 李华
网站建设 2026/5/19 11:50:42

Zephyr RTOS嵌入式音频系统优化策略与性能提升实践

Zephyr RTOS嵌入式音频系统优化策略与性能提升实践 【免费下载链接】zephyr Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures. 项目地址: https://gitcode.com/GitHub_T…

作者头像 李华