Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

SyntaxError: Unexpected token ':' — ajv code generation failure in @ui5/project 4.0.17

Abierto
#1,642 1 comentario 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@d3xter666 ya está trabajando en esto.

Desde el 8/10/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

module/ui5-project

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.

Lenguaje dominante
JavaScript
Estrellas
511
Forks
83
Merge medio
1 d 3 h
PR fusionados (30 d)
54

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de UI5/cli

Todos los issues de UI5/cli

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.