-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Description
I tried workflow on a Next.js Page Router project and ran into a couple of issues:
- It isn't clear the missing
appdirectory error is coming fromwithWorkflow: https://github.com/vercel/workflow/blob/main/packages/cli/src/lib/builders/next-build.ts#L459-L461 - Workflows that might be referenced from API routes are not bundled (as observed in
app/.well-known/workflow/v1/flow/route.js) unless the file name matches a pattern that app router uses: https://github.com/vercel/workflow/blob/main/packages/cli/src/lib/builders/next-build.ts#L324. Renaming the API route toroute.tsresolves this issue.
Including the missing error incase it helps someone searching as well:
ReferenceError: Workflow "workflow//workflows/hmm.ts//handleUserSignup" must be a function, but got "undefined" instead
Metadata
Metadata
Assignees
Labels
No labels