Skip to content

Lit playground downloaded code don't run locally. #3113

Discussion options

You must be logged in to vote

This is something we do want to make more seamless down the line. lit/lit.dev#690

You've got most of the needed pieces there but I don't see typescript as a dev dependency in your package.json. You could have it installed globally but I'd recommend installing it for the project.

npm i -D typescript

You'd then want to run npx tsc to compile the .ts files to .js so the browser can pick it up. You can also do npx tsc --watch to keep it running in watch mode so any changes you make to the .ts files will automatically be compiled.

Your tsconfig file should also include "useDefineForClassFields": false for the @property decorator to work. https://lit.dev/docs/components/decorators/#decorators-t…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@e111077
Comment options

@abhijeet-shelhalkar
Comment options

@ynxtynxt
Comment options

@e111077
Comment options

Answer selected by e111077
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants