Skip to content

[Bug] When building with prerendering enabled and base href specified builder throws errors #263

@AdrianKokot

Description

@AdrianKokot

Is this a regression?

Yes

Description

When I build ng-doc app with prerendering enabled, and I specify --base-href, then builder throws errors about ui-kit icons:

It can be reproduced by ng-doc demo app in this repository by building with nx build ng-doc -- --base-href=/test/test2/ --verbose

It occurred after upgrade to ng-doc 19 (with angular 19). Previously it worked as expected.

Please provide the exception or error you saw

Wt {
  headers: e {
    headers: Map(0) {},
    normalizedNames: Map(0) {},
    lazyInit: undefined,
    lazyUpdate: null
  },
  status: 0,
  statusText: 'Unknown Error',
  url: 'http://ng-localhost/test/test2/assets/ng-doc/ui-kit/icons/16/search.svg#search',
  ok: false,
  type: undefined,
  name: 'HttpErrorResponse',
  message: 'Http failure response for http://ng-localhost/test/test2/assets/ng-doc/ui-kit/icons/16/search.svg#search: 0 undefined',
  error: TypeError: fetch failed
      at Object.fetch (node:internal/deps/undici/undici:11731:11)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
    cause: Error: getaddrinfo ENOTFOUND ng-localhost
        at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
        at __node_internal_ (node:internal/errors:715:10)
        at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
      errno: -3008,
      code: 'ENOTFOUND',
      syscall: 'getaddrinfo',
      hostname: 'ng-localhost'
    }
  }
}

OS

Unix (Linux, macOS, etc.)

Browser

None

Node version

Checked with 18.19.1 and 20.14.0

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions