Closed tiagomendonc closed 6 months ago
It looks like you are trying to bundle the @temporalio/worker and @temporalio/workflow packages. This is not supported.
If you really need to bundle your Temporal Worker’s code, you will need to configure your bundler to keep the following packages as external:
@temporalio/worker
@temporalio/workflow
@temporalio/core-bridge
@temporalio/common
@temporalio/worker
@temporalio/proto
You will also need to pre-bundle your workflow code, e.g. by using bundleWorkflowCode() from your building script. See this sample. The file containing your Workflow Bundle’s code will also need to be marked as external.
@mjameswh help me with a development issue than, without the worker, I can create and start a workflow execution, but I believe that without a worker, it will not be finished, since that my workflow do not complete, is aways in Running status. Is this right?
it will not be finished
Exactly, it won't. The workflow is registered as started in Temporal Server, but if you don't have a worker listening on the task queue with the correct workflow definition, then it won't never advance.
Got it. Still, I can't build my app with workers. What exactly should I do?
Just to be more clear, I start my workflow client and than start the worker like this:
const worker = await Worker.create({ workflowsPath: require.resolve("./workflow"), taskQueue: "default", activities, });
@tiagomendonc At this point, I really can't tell anything more that what I said previously. Can you please give more details? Why and how are you bundling the Worker itself?
What are you really trying to do?
I'm trying to add a worker to my application so I can use workflows
Describe the bug
Everytime that I try to build my application, it says that some requirements can not be found.
Minimal Reproduction
Environment/Versions