# Workflow Testing Framework violates typescript checks? "duplicate name 'ActivityHeartbeat' in Namespace coresdk"

**URL:** <https://community.temporal.io/t/workflow-testing-framework-violates-typescript-checks-duplicate-name-activityheartbeat-in-namespace-coresdk/8804>\
**Category:** Community Support\
**Tags:** testing, typescript-sdk\
**Created:** [July 11, 2023, 6:41pm UTC](https://community.temporal.io/t/workflow-testing-framework-violates-typescript-checks-duplicate-name-activityheartbeat-in-namespace-coresdk/8804 "2023-07-11T18:41:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthias](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/matthias/32/4026_2.png) [@Matthias](https://community.temporal.io/u/Matthias)\
**Post date:** [July 11, 2023, 6:41pm UTC](https://community.temporal.io/t/workflow-testing-framework-violates-typescript-checks-duplicate-name-activityheartbeat-in-namespace-coresdk/8804/1 "2023-07-11T18:41:25Z")

</div>

Hello, I’m trying to run a simple workflow test and I find that there are linting and typescript errors when using the @temporalio/testing module.

So far, I’m faced with two issues and this post is about the second issue. The first issue is [Workflow Testing Framework violates typescript checks? @temporalio/worker/lib/connection").NativeConnection is not assignable to type @temporalio/testing/node\_modules/@temporalio/worker/lib/connection").NativeConnection](https://community.temporal.io/t/workflow-testing-framework-violates-typescript-checks-temporalio-worker-lib-connection-nativeconnection-is-not-assignable-to-type-temporalio-testing-node-modules-temporalio-worker-lib-connection-nativeconnection/8803)

This topic’s issue is the error “duplicate name ‘ActivityHeartbeat’ in Namespace coresdk" when trying to execute my simple workflow test.

```auto
FAIL test/workflows/my-workflow.test.ts
  ● Test suite failed to run

    duplicate name 'ActivityHeartbeat' in Namespace coresdk

      1 | import { TestWorkflowEnvironment } from '@temporalio/testing';
    > 2 | import { Worker, WorkerOptions } from '@temporalio/worker';
        | ^
      3 | import { v4 as uuid4 } from 'uuid';
      4 | import { WorkflowCoverage } from '@temporalio/nyc-test-coverage';

      at Namespace.add (node_modules/protobufjs/src/namespace.js:239:23)
      at Root.add (node_modules/protobufjs/src/namespace.js:232:28)
      at Root.addJSON (node_modules/protobufjs/src/namespace.js:172:16)
      at Object.<anonymous> (node_modules/@temporalio/proto/protos/json-module.js:7:2)
      at Object.<anonymous> (node_modules/@temporalio/proto/protos/root.js:8:23)
      at Object.<anonymous> (node_modules/@temporalio/proto/protos/index.js:1:38)
      at Object.<anonymous> (node_modules/@temporalio/worker/src/runtime.ts:23:1)
      at Object.<anonymous> (node_modules/@temporalio/worker/src/connection.ts:5:1)
      at Object.<anonymous> (node_modules/@temporalio/worker/src/index.ts:23:1)
      at Object.<anonymous> (test/workflows/my-workflow.test.ts:2:1)

```

Any advice is appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![jwatkins](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/jwatkins/32/2581_2.png) [@jwatkins](https://community.temporal.io/u/jwatkins)\
**Post date:** [July 11, 2023, 8:09pm UTC](https://community.temporal.io/t/workflow-testing-framework-violates-typescript-checks-duplicate-name-activityheartbeat-in-namespace-coresdk/8804/2 "2023-07-11T20:09:26Z")

</div>

Same as in your other post, this is due to having multiple copies of packages. In this case, its about `@temporalio/proto`. Possibly because you import different versions `@temporalio/*` packages.

---

<div class="post-metadata">

**Author:** ![Matthias](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/matthias/32/4026_2.png) [@Matthias](https://community.temporal.io/u/Matthias)\
**Post date:** [July 12, 2023, 2:17pm UTC](https://community.temporal.io/t/workflow-testing-framework-violates-typescript-checks-duplicate-name-activityheartbeat-in-namespace-coresdk/8804/3 "2023-07-12T14:17:54Z")

</div>

Just to close the thread on this issue as well…

The problem was that I installed the temporal packages right in-between upgrades so some were on 1.7 while others were on 1.8. A bit more detail can be seen on [Workflow Testing Framework violates typescript checks? @temporalio/worker/lib/connection").NativeConnection is not assignable to type @temporalio/testing/node\_modules/@temporalio/worker/lib/connection").NativeConnection - #4 by Matthias](https://community.temporal.io/t/workflow-testing-framework-violates-typescript-checks-temporalio-worker-lib-connection-nativeconnection-is-not-assignable-to-type-temporalio-testing-node-modules-temporalio-worker-lib-connection-nativeconnection/8803/4)

---

<div class="post-metadata">

**Author:** ![ivan\_cabrera](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/ivan_cabrera/32/7091_2.png) [@ivan\_cabrera](https://community.temporal.io/u/ivan_cabrera)\
**Post date:** [April 2, 2025, 12:09am UTC](https://community.temporal.io/t/workflow-testing-framework-violates-typescript-checks-duplicate-name-activityheartbeat-in-namespace-coresdk/8804/4 "2025-04-02T00:09:23Z")

</div>

In my case, I was updating the temporal packages to v1.11.7 (from v.1.11.5) and I got this error when starting the app:

```auto
Error: duplicate name 'ActivityHeartbeat' in Namespace coresdk
    at Namespace.add (/app/node_modules/protobufjs/src/namespace.js:239:23)
    at Root.add (/app/node_modules/protobufjs/src/namespace.js:232:28)
    at Root.addJSON (/app/node_modules/protobufjs/src/namespace.js:172:16)
    at Object.<anonymous> (/app/node_modules/@temporalio/proto/protos/json-module.js:7:2)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1024:12)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at Module.Hook.Module.require (/app/node_modules/dd-trace/packages/dd-trace/src/ritm.js:97:33)

```

After that, I left the @temporalio/proto package in v1.11.6 and received a similar error:

```auto
Error: duplicate name 'ActivityHeartbeat' in Namespace coresdk
    at Namespace.add (/app/node_modules/protobufjs/src/namespace.js:239:23)
    at Root.add (/app/node_modules/protobufjs/src/namespace.js:232:28)
    at Root.addJSON (/app/node_modules/protobufjs/src/namespace.js:172:16)
    at Object.<anonymous> (/app/node_modules/@temporalio/client/node_modules/@temporalio/proto/protos/json-module.js:7:2)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1024:12)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at Module.Hook.Module.require (/app/node_modules/dd-trace/packages/dd-trace/src/ritm.js:97:33)

```

So, I added the resolution in the package.json as shown:  
`"@temporalio/proto": "1.11.6"`

and leaving the rest packages in 1.11.7, and it worked. However, these warning appeared when running yarn:  
`warning Resolution field "@temporalio/proto@1.11.6" is incompatible with requested version "@temporalio/proto@1.11.7"`

But the app is now starting well, so, I guess there’s an issue with `proto` package in v1.11.7
