TypeScript Runtime Setup


I’m working through the guide here - TypeScript Runtime - Heroic Labs Documentation I tried both the video and the written guide but both seem to fail.

For the sake of this post lets talk about the written guide.

I’ve followed all of the steps down to “Running the project” and I’m following the Docker version.

It says create a Dockerfile, I assume this is in the ts-project directory as that’s where we have been operating prior to this step but I tried in the root as well and both seem to yield the following errors.

docker compose up
[+] Building 27.9s (16/16) FINISHED                                                                                                             docker:desktop-linux
 => [nakama internal] load build definition from Dockerfile                                                                                                     0.0s
 => => transferring dockerfile: 322B                                                                                                                            0.0s
 => [nakama internal] load metadata for registry.heroiclabs.com/heroiclabs/nakama:3.21.0                                                                       28.3s
 => [nakama internal] load metadata for docker.io/library/node:alpine                                                                                           1.2s
 => [nakama auth] library/node:pull token for registry-1.docker.io                                                                                              0.0s
 => [nakama internal] load .dockerignore                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                 0.0s
 => [nakama node-builder 1/7] FROM docker.io/library/node:alpine@sha256:577f8eb599858005100d84ef3fb6bd6582c1b6b17877a393cdae4bfc9935f068                        0.0s
 => [nakama internal] load build context                                                                                                                        0.0s
 => => transferring context: 141B                                                                                                                               0.0s
 => CACHED [nakama stage-1 1/3] FROM registry.heroiclabs.com/heroiclabs/nakama:3.21.0@sha256:409a328e33709722d6a9bc0ed9d47087c2ae031976bc775018bbb128bf3beaa0   0.0s
 => CACHED [nakama node-builder 2/7] WORKDIR /backend                                                                                                           0.0s
 => CACHED [nakama node-builder 3/7] COPY package*.json .                                                                                                       0.0s
 => CACHED [nakama node-builder 4/7] RUN npm install                                                                                                            0.0s
 => CACHED [nakama node-builder 5/7] COPY tsconfig.json .                                                                                                       0.0s
 => ERROR [nakama node-builder 6/7] COPY main.ts .                                                                                                              0.0s
 => CACHED [nakama node-builder 7/7] RUN npx tsc                                                                                                                0.0s
 => CACHED [nakama stage-1 2/3] COPY --from=node-builder /backend/build/*.js /nakama/data/modules/build/                                                        0.0s
 => ERROR [nakama stage-1 3/3] COPY local.yml .                                                                                                                 0.0s
 > [nakama node-builder 6/7] COPY main.ts .:
 > [nakama stage-1 3/3] COPY local.yml .:
failed to solve: failed to compute cache key: failed to calculate checksum of ref 52334666-8d11-41ad-b9fa-baa345b5711a::y4tit81iest6wmfv8l5jpnh9w: "/local.yml": not found

I’m not sure what I’m missing here but I’ve copied the Dockerfile and docker-compose.yml verbatim.

Any help would be greatly appreciated,


Hello @Wobling,

If your intent is to use rollup I suggest you work backwards and use our project template with rollup as a baseline and modify the source files with your own source code, as the guide may be a bit outdated at this point. Delete the Go and Lua source files if you’re not using those runtimes.

Hope this helps.