alibaba / alibaba/lowcode-engine

Uncaught SyntaxError: Illegal return statement

Open
#2,482 1 comment 0 reactions 0 assignees View on GitHub
insufficient information
Dominant language
TypeScript
Stars
15.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

## **Describe the bug (required)** / **详细描述 bug(必填)**
页面运行报错
![image](https://github.com/alibaba/lowcode-engine/assets/29434858/cb880aeb-5919-400b-be70-3cc4ddc8f2f4)

我把@alilc/lowcode-plugin-code-editor这个包隐藏掉就可以,但是放开就报错,不知道什么问题
---

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

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

---

English version example:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

中文版示例:
1. 打开 [demo](http://lowcode-engine.cn/demo);
2. 点击标题;
3. 在右侧修改标题内容为「修改后的标题」;
4. 渲染画布标题组件没有更新显示为「修改后的标题」;

## **Expected behavior (required)** / **预期行为(必填,非常重要)**
A clear and concise description of what did you expect to happen. / 请清晰和精确的描述你预期的行为

---

## **Screenshots (optional)** / **bug 截图(可选)**
Sceenshots for further information. (If applicable.) / 一些有用的截图将会帮助我们更好的明确以及定位问题

---

## **Environments (please complete the following information) (required):** / **请提供如下信息(必填)**
- "dependencies": {
"@alilc/lowcode-datasource-fetch-handler": "^1.1.4",
"@alilc/lowcode-plugin-code-editor": "^1.0.8",
"@alilc/lowcode-plugin-code-generator": "^1.0.6",
"@alilc/lowcode-plugin-components-pane": "^2.0.3",
"@alilc/lowcode-plugin-datasource-pane": "^1.0.11",
"@alilc/lowcode-plugin-inject": "^1.2.3",
"@alilc/lowcode-plugin-schema": "^1.0.5",
"@alilc/lowcode-plugin-set-ref-prop": "^1.0.1",
"@alilc/lowcode-plugin-simulator-select": "^1.0.4",
"@alilc/lowcode-plugin-undo-redo": "^1.0.1",
"@alilc/lowcode-plugin-zh-en": "^1.0.0",
"@alilc/lowcode-react-renderer": "^1.1.10",
"@alilc/lowcode-setter-behavior": "^1.0.0",
"@alilc/lowcode-setter-title": "^1.0.2",
"@alilc/lowcode-utils": "^1.1.10",
"@ant-design/icons": "^5.2.4",
"@ant-design/pro-components": "^2.6.17",
"@reduxjs/toolkit": "^1.9.5",
"@types/lodash": "^4.14.197",
"@types/node": "^20.4.9",
"@types/react-redux": "^7.1.25",
"@uiw/react-markdown-preview": "^4.1.15",
"ahooks": "^3.7.8",
"antd": "^5.8.0",
"axios": "^1.4.0",
"buffer": "^6.0.3",
"clean-webpack-plugin": "^4.0.0",
"core-js": "^3.32.0",
"lodash": "4.6.1",
"mockjs": "^1.1.0",
"moment": "2.24.0",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-redux": "^8.1.2",
"react-router": "^6.14.2",
"react-router-dom": "^6.14.2",
"redux": "^4.2.1",
"redux-thunk": "^2.4.2",
"sass-loader": "^13.3.2",
"unocss": "^0.55.7",
"vanilla-jsoneditor": "^0.18.3"
},
"devDependencies": {
"@alilc/lowcode-engine": "^1.1.10",
"@alilc/lowcode-engine-ext": "^1.0.6",
"@alilc/lowcode-types": "^1.1.10",
"@babel/core": "^7.22.11",
"@babel/preset-env": "^7.22.10",
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.11",
"@types/react": "^16.0.0",
"@types/react-dom": "^16.0.0",
"@unocss/transformer-compile-class": "^0.55.7",
"@unocss/transformer-variant-group": "^0.55.7",
"@unocss/webpack": "^0.55.7",
"babel-loader": "^9.1.3",
"cross-env": "^7.0.3",
"css-loader": "^6.8.1",
"css-minimizer-webpack-plugin": "^5.0.1",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.3",
"inquirer": "^9.2.10",
"less": "^4.1.3",
"less-loader": "^11.1.0",
"mini-css-extract-plugin": "^2.7.6",
"postcss": "^8.4.26",
"postcss-loader": "^7.3.3",
"postcss-preset-env": "^9.0.0",
"style-loader": "^3.3.3",
"typescript": "^5.1.6",
"url-loader": "^4.1.1",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0",
"webpackbar": "^5.0.2"
}
- AliLowCodeEngineExt version: [e.g. 1.0.0] / 低代码引擎扩展包版本
- Browser [e.g. chrome, safari] / 浏览器版本 117.0.5938.62
- materials / plugins / tools / 其他物料 / 插件 / 工具链版本

> (this information can be collected via [the manual plugin](https://img.alicdn.com/imgextra/i1/O1CN0115zonY1IsgbkZ2ir7_!!6000000000949-2-tps-3066-1650.png) / 版本信息可[通过低代码用户手册插件收集](https://img.alicdn.com/imgextra/i1/O1CN0115zonY1IsgbkZ2ir7_!!6000000000949-2-tps-3066-1650.png))

## **Additional context (optional)** / **更多额外信息(可选)**
Any other context of the problem here. / 可以追加更多的额外信息,帮助定位问题

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the @alilc/lowcode-plugin-code-editor entry point and the reported dependency setup, then reproduce the page with that plugin enabled and inspect the browser stack trace for the Illegal return statement. Confirm the plugin can load without the uncaught SyntaxError; the issue provides no named source file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript, webpack
Domain
frontend, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.