Closed
Description
Describe the bug
When I have the Angular runtime "active" in the Netlify UI build settings I get a TypeError: failBuild is not a function
Error. When I remove the Angular runtime the App builds and is fine but SSR doesnt work and no edge functions are deployed.
To Reproduce
Steps to reproduce the behavior:
- Build in Netlfiy
- See error "Building ❯ Loading plugins" step
Expected behavior
Build to complete and deploy with edge functions
Versions
- Angular: v19.0.3
- plugin: v2.2.1
- Node v20.18.1
netlify.toml: (have tried many iterations of this file. with/without the browser
and with/without the redirects)
[build]
command = "yarn build"
functions = "netlify/functions"
publish = "dist/jobs-marketplace/browser"
[[redirects]]
from = "/*"
status = 200
to = "/index.csr.html"
Things I tried:
- Remove the Angular runtime. It works but SSR seems turned off
- Following the steps in the angular-19-on-netlify blog post.
- Updates to my server.ts based on the This package's readme docs
- Changes in my netlifiy.toml
- Downgrading this plugin to v2.1.0
Here is the stacktrace for the error
TypeError: failBuild is not a function
at getProject (/opt/build/repo/node_modules/@netlify/angular-runtime/src/helpers/setUpEdgeFunction.js:30:14)
at fixOutputDir (/opt/build/repo/node_modules/@netlify/angular-runtime/src/helpers/fixOutputDir.js:8:19)
Failed during stage 'building site': Build script returned non-zero exit code: 4 (https://ntl.fyi/exit-code-4)
at onPreBuild (/opt/build/repo/node_modules/@netlify/angular-runtime/src/index.js:32:11)
at async file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/child/run.js:30:9
at async handleEvent (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/child/main.js:28:42)
at async process.<anonymous> (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/ipc.js:91:24)
I posted in more detail on the Netlify forms but considering this seems like it might be an issue with this package I would post and issue here.