Transpile issues with Next 14
Unanswered
Chesapeake Bay Retriever posted this in #help-forum
Chesapeake Bay RetrieverOP
Hi All, I'm trying to upgrade from next 13.5.6 to next 14 (I've tried 14.1.1 and 14.2.x) but I'm having an issue where when next tries to call a temoral.io workflow, it doesn't call the correct function. This seems to be because next is compiling the name / type of the workflow, and therefore when it calls the function, the temporal worker doesn't have any idea what function it is calling.
the error I get is: TypeError: Failed to initialize workflow of type 'nm': no such function is exported by the workflow bundle
Does anyone know why this would happen on next 14 and not next 13?
import { workflowName } from "@package/workflows/src";
export async function callTemporalWorkflow({
ctx,
input,
}: WorkflowInput): Promise<WorkflowOutput> {
const workflowId = "Workflow_" + uuid4();
const workflowHandle = await ctx.temporal.workflow.start(
workflowName,
{
workflowId: workflowId,
args: [
{
},
],
taskQueue: taskQueue,
},
);
return await workflowHandle.result();
}the error I get is: TypeError: Failed to initialize workflow of type 'nm': no such function is exported by the workflow bundle
Does anyone know why this would happen on next 14 and not next 13?