Closed chicken-suop closed 2 years ago
I think we'll need a better repro in order to diagnose the issue. It is unexpected that a build transform could result in the failure on the line you're seeing.
Is it possible to put a minimal repro in a github repo that we can download and build? Thanks.
Hi. I get the same error, but on different lines:
Uncaught (in promise) TypeError: Cannot read property '2' of null
at new Template (template.js:89)
at Object.eval [as templateFactory] (shady-render.js:83)
at NodePart.__commitTemplateResult (parts.js:274)
at NodePart.commit (parts.js:227)
at render (render.js:49)
at Function.render (shady-render.js:265)
at HTMLElement.update (lit-element.js:252)
at HTMLElement.performUpdate (updating-element.js:560)
at HTMLElement._enqueueUpdate (updating-element.js:513)
I've created a minimal repository in which error occurs: https://github.com/AndrewLevada/LitElementIssue1115 To reproduce run npm script "start:dev" and open http://localhost:2797/ Hope it helps)
Hello. Turns out that it's my mistake. Actually, two mistakes: I was adding html attributes (not tags) in conditional operators as normal strings:
<input id="${this.alias}-input" class="mdc-text-field__input"
type="${this.type}"
aria-labelledby="${this.alias}-input-label"
${this.minLength ? `minlength="${this.minLength}"` : ``}
${this.maxLength ? `maxlength="${this.maxLength}"` : ``}>
However, I don't think that the original issue is related to mine, despite the fact that exception occurs in almost the same lines of code as mine.
Closing due to age. Please reopen with a clear repro if your issue persists.
Description
I have a very simple component that uses
UpdatingElement
. The goal is to use the component in a legacy application. After having some initial difficulties regarding babel transforms, we've gotten to this point:My component
It works fine on a test environment, but once I import the component into the legacy app, I get the error.
Browserify
If you don't know browserify, don't worry about it. The only the thing to note is we're using babel to convert the lit-element and lit-html modules into better supported code.
The error
lit-html/src/lib/template.ts:93
Acceptance criteria
I must no longer get the error when using babel