Skip to content

app-vite v2 / app-webpack v4 - boot files are broken in SSR #17658

@yusufkandemir

Description

@yusufkandemir

Adding any boot file, even if totally empty, results in the SSR app silently exiting the app with exit code 13. Node 22 also prints a warning. The exit code 13 stands for unsettled top-level await. This is happening due to: nodejs/node#55468

This most likely started happening after moving quasar/wrappers to #q-app/wrappers. A compiled boot file contains import { d as defineBoot } from "../server-entry.js";. So, it produces a cyclic dependency, which matches the description in the Node bug linked above.

Old description

Title: Gracefully handle boot file errors in SSR

server-entry uses a top-level await Promise.all(...) call. So, if there is a failing boot file, the app silently exits with code 13. Even if you use node --trace-warnings index.js, you don't get much useful info because the file consists of a single line for minification reasons.

client-entry template uses Promise.allSettled to load the boot files, then prints an error in case of an error. So, we should adjust the server-entry template to do the same.

This can be put in to the app-vite v2 / app-webpack v4, then also be ported back to app-vite v1 / app-webpack v3.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions