AggregateError while running forge tunnel

Hello everyone,

I’m encountering an issue while running forge tunnel for my app development. The tunnel starts correctly, linting passes, and bundling succeeds, but then I see the following error:

=== Running forge lint...
No issues found.

=== Bundling code...
✔ Functions bundled.

Listening for requests on local port 58945...

(node:18935) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

Error: AggregateError
Error: AggregateError

Has anyone else faced this error while using Forge Tunnel?

  • What typically causes AggregateError in this context?
  • Are there recommended fixes or workarounds?

Any insights or suggestions would be greatly appreciated!

Hi @ANKITJangid1 - Did you try using the “node --trace-deprecation” command as suggested in the error message?

Follow-up edit: To enable this command with the Forge Tunnel, you need to use a local environment variable on your machine: NODE_OPTIONS: —trace-deprecation

For example, I use Windows PowerShell, so for me it looks like:

PS> $env:NODE_OPTIONS=“–trace-deprecation”
PS> forge tunnel

This should tell you where the deprecation warning is being triggered from, probably in one of your dependencies.

Hi @ANKITJangid1 ,
This usually happens when using Custom UI with tunnel.port in the manifest.yml.

For example:

resources:
  - key: main
    path: ./dist-forge
    tunnel:
      port: 8088

When forge tunnel starts, it tries to proxy requests to your local frontend dev server on http://localhost:8088.

If the frontend dev server is not running, or it’s running on a different port, Forge cannot connect and often throws a generic AggregateError.

I was able to reproduce this very easily by stopping the frontend dev server and then running forge tunnel.

1 Like