Skip to content

App Hosting Angular Adapter fails when Pre-rendering is enabled and there are logs #423

@lukasbuehler

Description

@lukasbuehler

In the adapter-angular in utils.js in the NPM package the build output is parsed as JSON, which fails with this error if there are any logs during pre-rendering:

.../node_modules/@apphosting/adapter-angular/dist/utils.js:133
        throw new Error(`Failed to parse build output manifest: ${error}`);
              ^

Error: Failed to parse build output manifest: SyntaxError: Expected property name or '}' in JSON at position 3 (line 1 column 4)
    at parseOutputBundleOptions (.../node_modules/@apphosting/adapter-angular/dist/utils.js:133:15)
    at .../node_modules/@apphosting/adapter-angular/dist/bin/build.js:19:33
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

This is not blocking for me as i realized that my logs that were happening during the pre-render stage in angular were causing the JSON parsing to fail.

This issue is to inform you and the public and maybe to get pre-rendering fixed.
Thank you for your work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions