Nextjs 13 --> 14 migration
Unanswered
Chesapeake Bay Retriever posted this in #help-forum
Chesapeake Bay RetrieverOP
Hi All
I'm having an issue with migrating from next13 to 14. Basically, I am trying to call a function but its name gets mangled and it doesn't work anymore.
const workflowHandle = await ctx.temporal.workflow.start(
functionName, ...)
gives a runtime error
ontra-worker:start: TypeError: Failed to initialize workflow of type 'c': no such function is exported by the workflow bundle
ontra-worker:start: at Object.initRuntime (/Users/connor/ontra/ontra-typescript/node_modules/@temporalio/workflow/src/worker-interface.ts:87:10)
ontra-worker:start: at evalmachine.<anonymous>:1:18
ontra-worker:start: at Script.runInContext (node:vm:148:12)
ontra-worker:start: at Object.runInContext (node:vm:300:6)
ontra-worker:start: at Proxy.<anonymous> (/Users/connor/ontra/ontra-typescript/node_modules/@temporalio/worker/lib/workflow/reusable-vm.js:94:50)
ontra-worker:start: at ReusableVMWorkflowCreator.createWorkflow (/Users/connor/ontra/ontra-typescript/node_modules/@temporalio/worker/lib/workflow/reusable-vm.js:121:24)
ontra-worker:start: at handleRequest (/Users/connor/ontra/ontra-typescript/node_modules/@temporalio/worker/lib/workflow/workflow-worker-thread.js:42:35)
ontra-worker:start: at MessagePort.<anonymous> (/Users/connor/ontra/ontra-typescript/node_modules/@temporalio/worker/lib/workflow/workflow-worker-thread.js:92:38)
ontra-worker:start: at [nodejs.internal.kHybridDispatch] (node:internal/event_target:826:20)
ontra-worker:start: at MessagePort
This is because the function is being incorrectly minified. I'm not sure how to fix this. This doesn't happen on next13 or in dev mode for 14
I'm having an issue with migrating from next13 to 14. Basically, I am trying to call a function but its name gets mangled and it doesn't work anymore.
const workflowHandle = await ctx.temporal.workflow.start(
functionName, ...)
gives a runtime error
ontra-worker:start: TypeError: Failed to initialize workflow of type 'c': no such function is exported by the workflow bundle
ontra-worker:start: at Object.initRuntime (/Users/connor/ontra/ontra-typescript/node_modules/@temporalio/workflow/src/worker-interface.ts:87:10)
ontra-worker:start: at evalmachine.<anonymous>:1:18
ontra-worker:start: at Script.runInContext (node:vm:148:12)
ontra-worker:start: at Object.runInContext (node:vm:300:6)
ontra-worker:start: at Proxy.<anonymous> (/Users/connor/ontra/ontra-typescript/node_modules/@temporalio/worker/lib/workflow/reusable-vm.js:94:50)
ontra-worker:start: at ReusableVMWorkflowCreator.createWorkflow (/Users/connor/ontra/ontra-typescript/node_modules/@temporalio/worker/lib/workflow/reusable-vm.js:121:24)
ontra-worker:start: at handleRequest (/Users/connor/ontra/ontra-typescript/node_modules/@temporalio/worker/lib/workflow/workflow-worker-thread.js:42:35)
ontra-worker:start: at MessagePort.<anonymous> (/Users/connor/ontra/ontra-typescript/node_modules/@temporalio/worker/lib/workflow/workflow-worker-thread.js:92:38)
ontra-worker:start: at [nodejs.internal.kHybridDispatch] (node:internal/event_target:826:20)
ontra-worker:start: at MessagePort
This is because the function is being incorrectly minified. I'm not sure how to fix this. This doesn't happen on next13 or in dev mode for 14