# Typescript runtine setup, nakama runtime namespace cannot be found by the IDE

**URL:** <https://forum.heroiclabs.com/t/typescript-runtine-setup-nakama-runtime-namespace-cannot-be-found-by-the-ide/5181>\
**Category:** Runtime Framework\
**Tags:** getting-started, typescript\
**Created:** [April 17, 2024, 7:16am UTC](https://forum.heroiclabs.com/t/typescript-runtine-setup-nakama-runtime-namespace-cannot-be-found-by-the-ide/5181 "2024-04-17T07:16:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spartan6nm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/spartan6nm/32/1799_2.png) [@spartan6nm](https://forum.heroiclabs.com/u/spartan6nm)\
**Post date:** [April 17, 2024, 7:16am UTC](https://forum.heroiclabs.com/t/typescript-runtine-setup-nakama-runtime-namespace-cannot-be-found-by-the-ide/5181/1 "2024-04-17T07:16:07Z")

</div>

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:

```auto
function InitModule(ctx: nkruntime.Context, logger: nkruntime.Nakama, initializer: nkruntime.Initializer)
{
    
}

```

## the error:

## Cannot find namespace ‘nkruntime’

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [April 17, 2024, 10:09am UTC](https://forum.heroiclabs.com/t/typescript-runtine-setup-nakama-runtime-namespace-cannot-be-found-by-the-ide/5181/2 "2024-04-17T10:09:58Z")

</div>

Hello @spartan6nm

Please link the video tutorial you’re referring to.

---

<div class="post-metadata">

**Author:** ![kybertrike](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@kybertrike](https://forum.heroiclabs.com/u/kybertrike)\
**Post date:** [September 30, 2025, 9:11am UTC](https://forum.heroiclabs.com/t/typescript-runtine-setup-nakama-runtime-namespace-cannot-be-found-by-the-ide/5181/3 "2025-09-30T09:11:15Z")

</div>

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`

> <https://github.com/heroiclabs/nakama-project-template/blob/6cab10c292049449d41882081a732c3bda6a1c3c/package.json#L23>

The important part in that repo is the namespace declaration [nakama-common/index.d.ts at 660e54f60a065def5519e0e281db8f6e1a9261d6 · heroiclabs/nakama-common · GitHub](https://github.com/heroiclabs/nakama-common/blob/660e54f60a065def5519e0e281db8f6e1a9261d6/index.d.ts#L15)

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. ❤
