# ERROR node-builder RUN npx tsc on attemt to setup Jest

**URL:** <https://forum.heroiclabs.com/t/error-node-builder-run-npx-tsc-on-attemt-to-setup-jest/4438>\
**Category:** Runtime Framework\
**Tags:** typescript\
**Created:** [October 8, 2023, 11:45am UTC](https://forum.heroiclabs.com/t/error-node-builder-run-npx-tsc-on-attemt-to-setup-jest/4438 "2023-10-08T11:45:28Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![georgeneversleep](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/georgeneversleep/32/1840_2.png) [@georgeneversleep](https://forum.heroiclabs.com/u/georgeneversleep)\
**Post date:** [October 10, 2023, 9:33am UTC](https://forum.heroiclabs.com/t/error-node-builder-run-npx-tsc-on-attemt-to-setup-jest/4438/8 "2023-10-10T09:33:42Z")

</div>

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.

```auto
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

1. Changing

```auto
js_entrypoint: "build/index.js"

```

with

```auto
path: "/nakama/data/modules/build"

```

1. Replacing `"outFile": "./build/index.js",` with `"outDir": "./build"` in tsconfig,json
2. Replacing

```auto
COPY --from=node-builder /backend/build/*.js /nakama/data/modules/build/

```

with

```auto
COPY --from=node-builder /backend/build/ /nakama/data/modules/build/

```

in the Dockerfile.

Thanks a lot for the help.

---

_[View the full topic](https://forum.heroiclabs.com/t/error-node-builder-run-npx-tsc-on-attemt-to-setup-jest/4438)._
