after watching the youtube tutorial video of how to setup a nakama runtime typescript project im trying to create a InitModule function but the IDE(vs code) cant find the nakama runtime namespace
my code:
function InitModule(ctx: nkruntime.Context, logger: nkruntime.Nakama, initializer: nkruntime.Initializer)
{
}
I saw this error too. I wasn’t following any video tutorial, I was just copying the example Tic-Tac-Toe project.
I think this problem comes from typescript not having access to the nkruntime type declarations. Those type declarations are contained within nakama-common
It’s not a npm package, but you can add it to your project the same way the example repo does it, using npm install github:heroiclabs/nakama-common#master
I know this question is old, but in my searching for an answer, I was led to this forum post. I figured it out so I wanted to leave an answer for future readers.