alibaba / alibaba/lowcode-engine

尝试自定义出码规则,出现 caught SyntaxError: Invalid or unexpected token 错误

Open
#2,130 2 comments 0 reactions 1 assignee Assigned to @qingniaotonghua View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

## **Describe the bug (required)** / **详细描述 bug(必填)**

尝试对出码内容做自定义处理,点击出码按钮提示 caught SyntaxError: Invalid or unexpected token 错误

---

## **To Reproduce (required)** / **如何复现 bug?(必填,非常重要)**

Steps to reproduce the behavior: / 详细复现步骤:

1. git clone git@github.com:wojiaofengzhongzhuifeng/gate-lowcode-code-generator-2.git
2. yarn
3. yarn build
4. node bin/lowcode-code-generator.js -i gate-schema.json -o generated -s icejs
5. 检查 generated/src/pages/$/index.jsx ,发现存在 自定义的lang_string 函数,符合预期
![image](https://github.com/alibaba/lowcode-engine/assets/25478678/28809140-b5fa-480b-a1d4-9c58d47c1580)
6. git clone git@github.com:wojiaofengzhongzhuifeng/lowcode-solution-gate-lowcode-output-plugin-1.git
7. 修改 package.json 的依赖项 gate-lowcode-code-generator-2 为 1.1.2
8. yarn
9. yarn start
10. 进入到 http://localhost:3333/ ,点击右上角的出码按钮,可以正常出码
7. 修改 package.json 的依赖项 gate-lowcode-code-generator-2 为 1.1.5
8. yarn
9. yarn start
12. 进入到 http://localhost:3333/ ,点击右上角的出码按钮,提示如下错误
![image](https://github.com/alibaba/lowcode-engine/assets/25478678/50d714c3-00fb-496d-a0ca-0ab296a7dbea)

---

## **Environments (please complete the following information) (required):** / **请提供如下信息(必填)**
- AliLowCodeEngine version: [e.g. 1.0.0] / 低代码引擎版本
- AliLowCodeEngineExt version: [e.g. 1.0.0] / 低代码引擎扩展包版本
- Browser [e.g. chrome, safari] / 浏览器版本
- materials / plugins / tools / 其他物料 / 插件 / 工具链版本
![image](https://github.com/alibaba/lowcode-engine/assets/25478678/748d188e-45fb-49e8-8a72-5eab8e9b2625)

## **Additional context (optional)** / **更多额外信息(可选)**
- gate-lowcode-code-generator-2@1.1.2 和 https://github.com/alibaba/lowcode-engine/tree/main/modules/code-generator 仓库一致,所以可以正常出码
- gate-lowcode-code-generator-2@1.1.5 添加了如下的自定义出码逻辑,[commit](https://github.com/wojiaofengzhongzhuifeng/gate-lowcode-code-generator-2/commit/5c903108fe848ee0357e60327b5e854e267b864d),目前的表象是添加了这个逻辑之后,就会导致出码功能出现错误

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.