Hello
I am running a very simple temporal worker:
import { Worker } from '@temporalio/worker';
import { testTaskPipelineServiceActivites } from "./temporal-test/temporal-pipeline-service-activities"
async function run() {
// Step 1: Register Workflows and Activities with the Worker and connect to
// the Temporal server.
const taskPipelineServiceWorker = await Worker.create({
//activities: testTaskPipelineServiceActivites,
taskQueue: 'task-pipeline-service',
namespace: 'test',
});
// Worker connects to localhost by default and uses console.error for logging.
// Customize the Worker by passing more options to create():
// https://typescript.temporal.io/api/classes/worker.Worker
// If you need to configure server connection parameters, see the mTLS example:
// https://github.com/temporalio/samples-typescript/tree/main/hello-world-mtls
// Step 2: Start accepting tasks on the `tutorial` queue
await taskPipelineServiceWorker.run();
// You may create multiple Workers in a single process in order to poll on multiple task queues.
}
if (require.main === module) {
run().catch(err => {
// eslint-disable-next-line no-console
console.error('Error running Temporal worker', err);
process.exit(1);
});
}
and when i try to start the worker it first starts fine, but in a few seconds i get:
âžś task-pipeline git:(test_taskpipelinev3_orchestration) âś— yarn temporal-worker
2022-06-14T20:29:39.641Z [INFO] Worker state changed { state: 'RUNNING' }
2022-06-14T20:30:36.718Z [ERROR] Worker failed {
error: TypeError: (seconds || long_1.default.UZERO).mul is not a function
at tsToMs (/Users/jackwang/scaleapi/.yarn/cache/@temporalio-internal-workflow-common-npm-0.23.0-6ffdfa1d79-6bc4b7524b.zip/node_modules/@temporalio/internal-workflow-common/lib/time.js:30:10)
at extractActivityInfo (/Users/jackwang/scaleapi/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/worker.js:1039:69)
at async /Users/jackwang/scaleapi/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/worker.js:360:42
at async /Users/jackwang/scaleapi/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/tracing.js:65:20
at async /Users/jackwang/scaleapi/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/worker.js:349:24
}
2022-06-14T20:30:36.720Z [INFO] Worker state changed { state: 'FAILED' }
Error running Temporal worker TypeError: (seconds || long_1.default.UZERO).mul is not a function
at tsToMs (/Users/jackwang/scaleapi/.yarn/cache/@temporalio-internal-workflow-common-npm-0.23.0-6ffdfa1d79-6bc4b7524b.zip/node_modules/@temporalio/internal-workflow-common/lib/time.js:30:10)
at extractActivityInfo (/Users/jackwang/scaleapi/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/worker.js:1039:69)
at async /Users/jackwang/scaleapi/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/worker.js:360:42
at async /Users/jackwang/scaleapi/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/tracing.js:65:20
at async /Users/jackwang/scaleapi/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/worker.js:349:24
i think this is a dependency issue somewhere. I added:
"long": "5.2.0",
to my dependencies to no effect.