Skip to content

[BUG] Studio & Preview Failing w/ Next Error #1864

@c1moore

Description

@c1moore

Describe the bug.

When running asyncapi start studio asyncapi.yaml or asyncapi start preview asyncapi.yaml, the following error is printed

"next start" does not work with "output: standalone" configuration. Use "node .next/standalone/server.js" instead.
/opt/homebrew/Cellar/asyncapi/3.5.2/libexec/lib/node_modules/@asyncapi/cli/node_modules/next/dist/server/next-server.js:703
        return (routesManifest == null ? void 0 : routesManifest.rewrites.beforeFiles.filter(_generateinterceptionroutesrewrites.isInterceptionRouteRewrite).map((rewrite)=>new RegExp(rewrite.regex))) ?? [];
                                                                                      ^

TypeError: Cannot read properties of undefined (reading 'filter')
    at NextNodeServer.getinterceptionRoutePatterns (/opt/homebrew/Cellar/asyncapi/3.5.2/libexec/lib/node_modules/@asyncapi/cli/node_modules/next/dist/server/next-server.js:703:87)
    at new Server (/opt/homebrew/Cellar/asyncapi/3.5.2/libexec/lib/node_modules/@asyncapi/cli/node_modules/next/dist/server/base-server.js:411:47)
    at new NextNodeServer (/opt/homebrew/Cellar/asyncapi/3.5.2/libexec/lib/node_modules/@asyncapi/cli/node_modules/next/dist/server/next-server.js:227:9)
    at NextServer.createServer (/opt/homebrew/Cellar/asyncapi/3.5.2/libexec/lib/node_modules/@asyncapi/cli/node_modules/next/dist/server/next.js:187:24)
    at async /opt/homebrew/Cellar/asyncapi/3.5.2/libexec/lib/node_modules/@asyncapi/cli/node_modules/next/dist/server/next.js:225:31
    at async NextServer.prepare (/opt/homebrew/Cellar/asyncapi/3.5.2/libexec/lib/node_modules/@asyncapi/cli/node_modules/next/dist/server/next.js:165:24)
    at async initializeImpl (/opt/homebrew/Cellar/asyncapi/3.5.2/libexec/lib/node_modules/@asyncapi/cli/node_modules/next/dist/server/lib/render-server.js:105:5)
    at async initialize (/opt/homebrew/Cellar/asyncapi/3.5.2/libexec/lib/node_modules/@asyncapi/cli/node_modules/next/dist/server/lib/router-server.js:538:22)
    at async NextCustomServer.prepare (/opt/homebrew/Cellar/asyncapi/3.5.2/libexec/lib/node_modules/@asyncapi/cli/node_modules/next/dist/server/next.js:287:28)

Node.js v24.7.0

This issue persists regardless of the NodeJS version (tried versions 16, 18, 20, 22, 24), installation method (brew and npm with various versions), or asyncapi CLI version (tried latest patch version of all minor versions from v3.3 to the current version).

Expected behavior

preview and studio start successfully.

Screenshots

See stack trace above.

How to Reproduce

  1. Install asyncapi
  2. Create a simple asyncapi.yaml
  3. Run asyncapi start preview asyncapi.yaml

🖥️ Device Information [optional]

  • Operating System (OS): Mac 15
  • Browser: Chrome
  • Browser Version: 140

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    To Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions