SyntaxError: Unexpected token ':' — ajv code generation failure in @ui5/project 4.0.17
Maintainer thường phản hồi trong vòng 1 ngày
@d3xter666 đang làm issue này rồi.
Từ ngày 8/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Here is the final ready-to-copy template with all values filled in:
Title:
SyntaxError: Unexpected token ':' — ajv code generation failure in @ui5/project 4.0.17
## Expected Behavior
Running `npm run int-test` (or any `fiori run` command) starts the local development server and opens the application without errors.
## Current Behavior
The process fails immediately with `SyntaxError: Unexpected token ':'` thrown inside `ajv`'s code generator when `@ui5/project` compiles its JSON schema for validating `ui5.yaml`. The server never starts.
## Steps to Reproduce the Issue
1. Clone a project using `@ui5/project` 4.0.17 (no `package-lock.json` in the repository)
2. Run `npm install` — this resolves `@ui5/[email protected]` which installs a nested `[email protected]` under `node_modules/@ui5/project/node_modules/ajv`
3. Run any `fiori run` command, e.g. `npm run int-test`
## Context
* UI5 Module Version (output of `ui5 --version` when using the CLI): **`4.0.70`**
* Node.js Version: **`v24.21.0`**
* npm Version: `11.19.0`
* OS/Platform: `Windows 11`
* Browser *(if relevant)*: `not relevant`
* Other information regarding your environment:
- `@ui5/project` version: `4.0.17`
- `ajv` version (nested in `@ui5/project/node_modules`): `8.20.0`
- A colleague using an older `@ui5/project` version (installed before 4.0.17 was published) does **not** experience this issue
- Workaround confirmed: deleting the nested `ajv` folder or downgrading it to `8.17.1` resolves the issue
## Log Output / Stack Trace
Process Failed With Error
Error Message:
Unexpected token ':'
Stack Trace:
SyntaxError: Unexpected token ':'
at new Function ()
at Ajv.compileSchema (node_modules/@ui5/project/node_modules/ajv/dist/compile/index.js:89:30)
at Ajv.inlineOrCompile (node_modules/@ui5/project/node_modules/ajv/dist/compile/index.js:148:47)
at Ajv.resolveRef (node_modules/@ui5/project/node_modules/ajv/dist/compile/index.js:142:46)
at Object.code (node_modules/@ui5/project/node_modules/ajv/dist/vocabularies/core/ref.js:19:47)
at keywordCode (node_modules/@ui5/project/node_modules/ajv/dist/compile/validate/index.js:464:13)
at CodeGen.code (node_modules/@ui5/project/node_modules/ajv/dist/compile/codegen/index.js:439:13)
at CodeGen.block (node_modules/@ui5/project/node_modules/ajv/dist/compile/codegen/index.js:568:18)
at schemaKeywords (node_modules/@ui5/project/node_modules/ajv/dist/compile/validate/index.js:185:13)
**Workaround:**
Deleting the nested `ajv` folder forces fallback to the top-level `[email protected]`, which works correctly:
```bash
# Windows (PowerShell)
Remove-Item -Recurse -Force "node_modules/@ui5/project/node_modules/ajv"
# Alternative
npm install --no-save --prefix node_modules/@ui5/project [email protected]
Note: both workarounds must be re-applied after every npm install.
- Ngôn ngữ chính
- JavaScript
- Star
- 509
- Fork
- 82
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 54
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của UI5/cli
-
Build cache: buildThemes cache is invalidated by irrelevant library.js / .library content changesĐang mởmodule/ui5-builder module/ui5-fs module/ui5-project
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
module/ui5-project
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[ROADMAP] UI5 CLI 6.0 / Specification Version 6.0Có thể làm lại được @flovogt đã nhận 71 ngày trước và không có pull request nào đang mở. Đang mởroadmap
UI5/cli#1485 · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
build excludes from application project are not applied to dependenciesCó thể làm lại được @flovogt đã nhận 45 ngày trước và không có pull request nào đang mở. Đang mở
UI5/cli#1446 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Option to specify custom UI5 config for workspace dependency resolutionCó thể đã có người làm @flovogt đã nhận 171 ngày trước. Đang mở
UI5/cli#1369 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
BUG
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: filesystem-edit-file converts a CRLF file's line endings to LF on every editCó thể đã có người làm @MohammadHijjawi97 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Mintplex-Labs/anything-llm#6755 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
flarum/framework#5231 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
apache/rocketmq-dashboard#6896 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày