Skip to content

TypeError: app.getAllowedDomains is not a function on Node adapter #14513

@khromov

Description

@khromov

Astro Info

npx astro info
Astro                    v5.14.1
Vite                     v6.3.6
Node                     v22.19.0
System                   macOS (arm64)
Package Manager          npm
Output                   static
Adapter                  @astrojs/node (v9.4.5)
Integrations             @astrojs/react (v4.4.0)

If this issue only occurs in one browser, which browser is a problem?

Describe the Bug

  1. Create a new minimal app
  2. Add Node.js adapter
  3. Make at least one route prerender = false
  4. npm run build && node dist/server/entry.mjs
  5. Load the page with the non-prerendered route

What's the expected result?

Should work, but instead:

13:22:35 [build] Server built in 777ms
13:22:35 [build] Complete!
13:22:35 [@astrojs/node] Server listening on http://localhost:4321
13:22:37 [ERROR] [@astrojs/node] Could not render /dynamic
TypeError: app.getAllowedDomains is not a function
    at file:///Users/xxx/Documents/GitHub/astro-styling-test/dist/server/chunks/_@astrojs-ssr-adapter_BrwZ3t3_.mjs:3823:29
    at file:///Users/xxxx/Documents/GitHub/astro-styling-test/dist/server/chunks/_@astrojs-ssr-adapter_BrwZ3t3_.mjs:4079:35
    at SendStream.<anonymous> (file:///Users/xxx/Documents/GitHub/astro-styling-test/dist/server/chunks/_@astrojs-ssr-adapter_BrwZ3t3_.mjs:4011:9)
    at SendStream.emit (node:events:519:28)
    at SendStream.error (/Users/xxx/Documents/GitHub/astro-styling-test/node_modules/send/index.js:168:17)
    at SendStream.onStatError (/Users/xxx/Documents/GitHub/astro-styling-test/node_modules/send/index.js:315:12)
    at next (/Users/xxx/Documents/GitHub/astro-styling-test/node_modules/send/index.js:621:16)
    at onstat (/Users/xxx/Documents/GitHub/astro-styling-test/node_modules/send/index.js:609:14)
    at FSReqCallback.oncomplete (node:fs:197:21)

Link to Minimal Reproducible Example

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P3: minor bugAn edge case that only affects very specific usage (priority)feat: ssrRelated to SSR (scope)pkg: nodeRelated to Node adapter (scope)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions