Skip to content

Workflow does not work well/properly when using basePath on Nextjs app #1864

@bhuone-garbu

Description

@bhuone-garbu

I have multiple apps running side by side, and migrating 1 app but incrementally.

App 1 (the first nextjsapp)

  • Has all the routes

App 2 (has a base path /v2)

  • has workflow apis and routes under the workflows
  • App1 rewrites /v2 -> App2 everything works within nextjs

This is on Vercel logs.

Failed to handle /v2/.well-known/workflow/v1/flow Error: Cannot find module './.next/server/pages/clients/.well-known/workflow/v1/flow.js'
Require stack:
- /var/task/web/app_2/___next_launcher.cjs
- /opt/rust/nodejs.js
    at <unknown> (../../../../opt/rust/nodejs.js:2:13531)
    at Module.hn (../../../../opt/rust/nodejs.js:2:13909)
    at Xe.e.<computed>.Ye._load (../../../../opt/rust/nodejs.js:2:13501) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/var/task/web/app_2/___next_launcher.cjs',
    '/opt/rust/nodejs.js'
  ]
}

The app side by side is just a thing that exists. But even if I run app2 on it's own locally, I still get:

POST /.well-known/workflow/v1/flow 404 in 99ms (next.js: 17ms, application-code: 82ms)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions