opentiny / opentiny/tiny-engine

How to update /app-center/v1/api/apps/schema/:id componentsMap ?

Open
#1,485 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Vue
Stars
2.8k
Forks
476
Avg merge
17h 35m
Merged PRs (30d)
1

Description

问题简单描述:

启动Node 服务端后,设计器界面正常渲染,但预览页面无法正常渲染 Element-plus 组件,因为缺少 componentsMap 定义。

Image

问题复现步骤:

  1. 按照文档进行Node服务端的部署 官网文档
  2. 进行物料同步
pnpm splitMaterials

pnpm buildMaterials

pnpm buildMaterials 执行时出现的问题:

问题1:同步过程中发现提供过的初始化Sql 创建的 t_component 表结构与插入格式不匹配。
该问题已通过使用 java 项目中的表结构初始化解决问题。

问题2: Error: ER_NO_SUCH_TABLE: Table 'xxx.r_material_history_component' doesn't exist

查看发现未初始化该表结构。
https://github.com/opentiny/tiny-engine/blob/9ee36c1291f86fb32cbf38b25dc7edb234b3751d/scripts/connection.mjs#L224

同样按照 java 项目中的表结构初始化

问题3: 预览页面无法正常渲染 Element-plus 组件

定位接口: /app-center/v1/api/apps/schema/:id

排查后定位 componentsMap 缺少相关定义。

Image

推测:是否与问题2中组件关联物料资产包没有成功执行有关?

我应该如何继续修复这个问题?

非常期待得到您的帮助,谢谢 💐💐

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Node server deployment and material sync with pnpm splitMaterials and pnpm buildMaterials. Inspect scripts/connection.mjs around line 224, the initialization of t_component and r_material_history_component, and the /app-center/v1/api/apps/schema/:id response; done means the preview renders Element-plus components with the expected componentsMap.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend, databases, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.