Search code examples
lit

Lit not working, not giving back anything from the custom web component


I'm trying to learn how to use lit as a dev tool for making web components and I'm having issues with making it run on my system.

In the documentation it states that you just need to run the command "npm i lit" on the folder of your project and after being successfully installed it should be running.

I did the "simple greeting" test also available on the documentation but it's returning me a blank page. I even copy-pasted both ts and html. Still blank page.

on my html, if I drill something into it, it shows on the page, so I know it's something regarding the custom web component (named simple-greeting).

I already did a course on native web components and I understand how it works, but I never worked with lit.

Isn't it just to import the necessary things from the respective library (like html, css, LitElement) and use it in TS?

Am I missing something? I am really confused and can't find anything online.

Thanks in advance.


Solution

  • It seems I forgot to run the web server. Still a long way to go, I guess.