Skip to content

TypeError: Cannot read properties of undefined (reading 'Symbol(Symbol.metadata)') #865

Closed Answered by endel
mmzhangliyang asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for sharing. You need to add "useDefineForClassFields": false to your tsconfig.json file.

This config is required because of how @colyseus/schema uses property descriptors in classes in conjunction to JavaScript's legacy decorators.

Replies: 1 comment 4 replies

Comment options

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

@endel
Comment options

Answer selected by mmzhangliyang
@mmzhangliyang
Comment options

@CrimsonBolt47
Comment options

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