Registry / devops / erpnext-queue-client

erpnext-queue-client

JSON →
library2.9.2jsnpmunverified

A client library for setting up and managing jobs in the Temporal queue for processing ERPNext requests. Current stable version is 2.9.2, released monthly. It wraps the Temporal Client and Workflow APIs, providing a typed interface for enqueueing ERPNext operations. Differentiator: simplifies Temporal integration for ERPNext automation vs using Temporal SDK directly.

npm install erpnext-queue-client
INSTALL
IMPORT
SIG · ERPNEXT-QUEUE-CLIE
E
erpnext-queue-client
devopsjavascriptv2.9.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

erpnextQueueClient
import { erpnextQueueClient } from 'erpnext-queue-client'
const erpnextQueueClient = require('erpnext-queue-client')
ESM-only since v2. Requires Node >= 22.
createWorkflow
import { createWorkflow } from 'erpnext-queue-client'
import { createWorkflow } from '@temporalio/workflow'
This package wraps Temporal's createWorkflow with ERPNext-specific configuration.
EnqueueJobInput
import { EnqueueJobInput } from 'erpnext-queue-client'
type { EnqueueJobInput } from 'erpnext-queue-client'
Type export, but not needed in runtime; use type import for TypeScript.

Shows initializing the client, creating a workflow, and enqueueing an ERPNext request job.

import { erpnextQueueClient, createWorkflow, EnqueueJobInput } from 'erpnext-queue-client'; const client = erpnextQueueClient({ temporalServerUrl: process.env.TEMPORAL_SERVER_URL ?? 'localhost:7233', namespace: process.env.TEMPORAL_NAMESPACE ?? 'default', }); async function enqueueJob(jobInput: EnqueueJobInput) { const workflow = createWorkflow(client, { taskQueue: 'erpnext-queue', workflowType: 'erpnext-processor', }); const result = await workflow.execute(jobInput); console.log('Job result:', result); } enqueueJob({ url: 'https://erpnextexample.com/api/resource', method: 'GET', headers: { Authorization: 'token ' + (process.env.ERPNext_TOKEN ?? '') } });
Debug
Known issues
breakingv2.0.0: Migration from CommonJS to ESM-only. Require() will fail.
fix
Update imports to ESM syntax: import { erpnextQueueClient } from 'erpnext-queue-client'
affects: <2.0.0
breakingv2.9.0: Removed support for Temporal SDK v1. Requires Temporal SDK v2.
fix
Upgrade Temporal dependencies: npm install @temporalio/client@^2 @temporalio/workflow@^2
affects: <2.9.0
deprecatedv2.5.0: Deprecated 'enqueueJob' standalone function. Use 'createWorkflow' and '.execute()' instead.
fix
Replace enqueueJob() calls with createWorkflow(client, {...}).execute(input)
affects: >=2.5.0
gotchaEnvironment variables TEMPORAL_SERVER_URL and TEMPORAL_NAMESPACE must be set, otherwise defaults to localhost:7233 and 'default'. In production, hardcoding these can lead to connection failures.
fix
Set TEMPORAL_SERVER_URL and TEMPORAL_NAMESPACE in environment.
affects: >=2.0.0
gotchaThe package uses Temporal's POJO serialization. Non-serializable values (e.g., functions, Dates) in job input will cause errors.
fix
Ensure job input only contains serializable data (strings, numbers, plain objects). Convert Dates to ISO strings.
affects: >=2.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/node_modules/erpnext-queue-client/lib/index.js from /path/app.js not supported.
Using require() with the ESM-only package.
fix
Change to import syntax or use dynamic import().
TypeError: client.createWorkflow is not a function
Using the wrong export or incorrect Temporal client initialization.
fix
Import and use createWorkflow from the package, not from @temporalio/client. Usage: import { createWorkflow } from 'erpnext-queue-client'; const workflow = createWorkflow(client, opts);
WorkflowExecutionError: workflow execution failed: ApplicationError: unknown workflow type
Temporal worker not registered with the workflow type 'erpnext-processor' or custom type.
fix
Register the workflow type on the Temporal worker. Ensure worker runs with correct taskQueue.
ValueError: EnqueueJobInput must have 'url' property
Missing required 'url' field in the job input.
fix
Set the url property in the input object.
Upgrade
Version history
2.9.2latest on npm
Audit
Dependencies
@temporalio/clientrequiredCore dependency for Temporal client operations
@temporalio/workflowrequiredCore dependency for workflow definitions
Agent activity
25 hits · last 30 days
node
24
OpenAI (training)
1
Resources
erpnext-queue-client — npm install erpnext-queue-client · libregistry