Dev server fails unrecoverable, if LWC is rendered that recursively references itself
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript
- Área
- devtools
Línea de trabajo
Reproduce the failure with sf lightning dev app -t desktop using the recursive c-drag-drop-tree-branch example, and compare it with the normal renderer. Trace the generated tmpl error to the dev-server handling of self-referencing LWCs; done means the dev server renders the recursive tree successfully.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The dev server fails to render, if it tries to display an LWC that recursively references itself.
Sorry if the bug report is incomplete and misses relevant information. It's my first bug report. I am very happy to help investigation & debugging.
Steps To Reproduce:
A simple tree implementation
<!-- c-drag-drop-tree-branch -->
<template>
<div class="draggable-card slds-var-m-vertical_small">
<lightning-formatted-text value={nodeName}></lightning-formatted-text>
<template if:true={hasChildren}>
<template for:each={children} for:item="item">
<div
key={item.id}
class="slds-var-m-left_medium slds-var-m-vertical_small"
>
<c-drag-drop-tree-branch
data-id={item.id}
role="treebranch"
branch-data={item}
is-root="false"
draggable
></c-drag-drop-tree-branch>
</div>
</template>
</template>
</div>
</template>
Expected Result
The dev-server renders the LWC correctly and shows the same result as the "normal" (?) renderer.
When the source is pushed LWC dev server is off, it renders the tree recursively
Actual Result
When dev server is launched (sf lightning dev app -t desktop), it throws this error
function tmpl($api, $cmp, $slotset, $ctx) {
const {c: api_custom_element, k: api_key, h: api_element, i: api_iterator, f: api_flatten} = $api;
return [api_element("div", stc0, api_flatten([api_custom_element("lightning-formatted-text", _lightningFormattedText__default.default, {
props: {
"value": $cmp.nodeName
},
key: 1
}), $cmp.hasChildren ? api_iterator($cmp.children, function (item) {
return api_element("div", {
classMap: stc1,
key: api_key(2, item.id)
}, [api_custom_element("c-drag-drop-tree-branch", _cDragDropTreeBranch, {
attrs: {
"data-id": item.id
},
props: {
"role": "treebranch",
"branchData": item,
"isRoot": "false",
"draggable": true
},
key: 3
})]);
}) : stc2]))];
/*LWC compiler v7.1.3*/
} is not a valid component, or does not extends LightningElement from "lwc". You probably forgot to add the extend clause on the class declaration.
Additional Information
Screenshots:
Logs:
System Information
SF CLI:
@j-schreiber/sf-plugin 0.1.2
@tmh-bis-salesforce/tmh-bis-salesforce-cli-plugin 0.8.3
community 3.3.2 (3.3.2)
dev 2.5.0 (2.5.0)
lightning-dev 1.9.3
packaging 2.9.0
sfdmu 4.36.7
texei-sfdx-plugin 2.8.1
Uninstalled JIT Plugins:
custom-metadata 3.3.36
devops-center 1.2.25
env 3.0.33
functions 1.23.0
signups 2.5.23
@salesforce/sfdx-plugin-lwc-test 1.2.1
@salesforce/sfdx-scanner 4.7.0
- Lenguaje dominante
- TypeScript
- Estrellas
- 19
- Forks
- 19
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de salesforcecli/plugin-lightning-dev
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
salesforcecli/plugin-lightning-dev#686 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
salesforcecli/plugin-lightning-dev#627 · 2 comentarios · 1 reacción ·
-
BUG P2
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
salesforcecli/plugin-lightning-dev#544 · 4 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
salesforcecli/plugin-lightning-dev#456 · 1 reacción ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Todos los issues de salesforcecli/plugin-lightning-dev
Issues similares
-
fix(data-lake): wizard source step still previews the local slug, not the server-disambiguated oneAbiertodata-lake
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue priority: low size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Empty label or headline exports the editor hint ("LABEL" / "Headline goes here") into the PNGAbierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
Spray wall wizard: Done button on the hold review step sits under the navigation header (iOS)Abiertobug ios mobile priority:P1
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
streamplace/streamplace#1351 ·
Los mantenedores suelen responder en 2 días