firebase / firebase/apphosting-adapters

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

Open
#423 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
478
Forks
1.5k
Avg merge
3d 22h
Merged PRs (30d)
2

Description

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!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.