# Error when executing workflows

**URL:** <https://community.temporal.io/t/error-when-executing-workflows/4814>\
**Category:** Community Support\
**Tags:** typescript-sdk\
**Created:** [May 26, 2022, 8:41pm UTC](https://community.temporal.io/t/error-when-executing-workflows/4814 "2022-05-26T20:41:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rifruf](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/rifruf/32/2121_2.png) [@rifruf](https://community.temporal.io/u/rifruf)\
**Post date:** [May 26, 2022, 8:41pm UTC](https://community.temporal.io/t/error-when-executing-workflows/4814/1 "2022-05-26T20:41:18Z")

</div>

I’m getting this error on my worker (which is only executing workflows).

```auto
2022-05-26T20:37:47.581Z [ERROR] Failed to activate workflow {
  runId: '8095be57-568d-46c2-8d69-29ff8108e600',
  error: TypeError: randomnessSeed.toBytes is not a function
      at /Users/brianlu/testing/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/worker.js:595:72
      at /Users/brianlu/testing/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/tracing.js:65:26
      at NoopContextManager.with (/Users/brianlu/testing/.yarn/cache/@opentelemetry-api-npm-1.1.0-7f8c5a33ef-8be8e8dd20.zip/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js:36:24)
      at ContextAPI.with (/Users/brianlu/testing/.yarn/cache/@opentelemetry-api-npm-1.1.0-7f8c5a33ef-8be8e8dd20.zip/node_modules/@opentelemetry/api/build/src/api/context.js:71:54)
      at instrument (/Users/brianlu/testing/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/tracing.js:61:29)
      at /Users/brianlu/testing/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/worker.js:592:81
      at /Users/brianlu/testing/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/tracing.js:65:26
      at NoopContextManager.with (/Users/brianlu/testing/.yarn/cache/@opentelemetry-api-npm-1.1.0-7f8c5a33ef-8be8e8dd20.zip/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js:36:24)
      at ContextAPI.with (/Users/brianlu/testing/.yarn/cache/@opentelemetry-api-npm-1.1.0-7f8c5a33ef-8be8e8dd20.zip/node_modules/@opentelemetry/api/build/src/api/context.js:71:54)
      at instrument (/Users/brianlu/testing/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/tracing.js:61:29),
  workflowExists: false
}

```

---

<div class="post-metadata">

**Author:** ![loren](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/loren/32/5099_2.png) [@loren](https://community.temporal.io/u/loren)\
**Post date:** [May 26, 2022, 9:00pm UTC](https://community.temporal.io/t/error-when-executing-workflows/4814/2 "2022-05-26T21:00:07Z")

</div>

`randomnessSeed` is a Long that’s deserialized with `protobufjs`, and the `toBytes` function should be provided by the `long` npm package. What’s the output of `npm ls long`?

---

<div class="post-metadata">

**Author:** ![rifruf](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/rifruf/32/2121_2.png) [@rifruf](https://community.temporal.io/u/rifruf)\
**Post date:** [May 26, 2022, 9:01pm UTC](https://community.temporal.io/t/error-when-executing-workflows/4814/3 "2022-05-26T21:01:04Z")

</div>

I’m using yarn, should I use a diff command?

```auto
temporal-workflows@0.0.0 /Users/brianlu/testing/packages/temporal_workflows
└── (empty)

```

---

<div class="post-metadata">

**Author:** ![rifruf](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/rifruf/32/2121_2.png) [@rifruf](https://community.temporal.io/u/rifruf)\
**Post date:** [May 26, 2022, 9:21pm UTC](https://community.temporal.io/t/error-when-executing-workflows/4814/4 "2022-05-26T21:21:32Z")

</div>

Since I was using yarn, needed to have long listed as a dependency in my package.json in a higher directory, thank you for the help!
