Fernando, thanks a lot. Your solutions and explanation give me a good starting point to make it up and running.
After replacing the typescript with the ts-patch and adding other changes you are listed, I faced another problem. It was impossible to use import and export declarations.
error TS6131: Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'
To overcome it I was forced to make additional changes in the local.yml
- Changing
js_entrypoint: "build/index.js"
with
path: "/nakama/data/modules/build"
- Replacing
"outFile": "./build/index.js",
with"outDir": "./build"
in tsconfig,json - Replacing
COPY --from=node-builder /backend/build/*.js /nakama/data/modules/build/
with
COPY --from=node-builder /backend/build/ /nakama/data/modules/build/
in the Dockerfile.
Thanks a lot for the help.