Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prerender requests to static files don't work. #1421

Open
2 tasks
intelligentRaji opened this issue Oct 27, 2024 · 0 comments
Open
2 tasks

Prerender requests to static files don't work. #1421

intelligentRaji opened this issue Oct 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@intelligentRaji
Copy link

intelligentRaji commented Oct 27, 2024

Please provide the environment you discovered this bug in.

https://github.com/intelligentRaji/analog/tree/prerender-request-bug

Which area/package is the issue in?

analog-build

Description

This is forked AnalogJS repo with one simple change. In the analog-app project inside vite.config.ts file I added to prerender array one more path '/shipping'. After that analog, during build (nx build analog-app), started throw an error:

Please provide the exception or error you saw

Prerendering static pages...
shipping
test cookie undefined
ERROR FetchError: [GET] "http://localhost/assets/shipping.json": <no response> fetch failed
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  [cause]: TypeError: fetch failed
      at node:internal/deps/undici/undici:13193:13
      at _ZoneDelegate.invoke (file:///C:/Users/sergd/code/download/analog/dist/apps/analog-app/ssr/main.server.js:327:158)
      at _ZoneImpl.run (file:///C:/Users/sergd/code/download/analog/dist/apps/analog-app/ssr/main.server.js:106:39)
      at file:///C:/Users/sergd/code/download/analog/dist/apps/analog-app/ssr/main.server.js:1036:30
      at _ZoneDelegate.invokeTask (file:///C:/Users/sergd/code/download/analog/dist/apps/analog-app/ssr/main.server.js:352:171)
      at _ZoneImpl.runTask (file:///C:/Users/sergd/code/download/analog/dist/apps/analog-app/ssr/main.server.js:156:41)
      at drainMicroTaskQueue (file:///C:/Users/sergd/code/download/analog/dist/apps/analog-app/ssr/main.server.js:507:23)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
    [cause]: AggregateError [ECONNREFUSED]:
        at internalConnectMultiple (node:net:1118:18)
        at afterConnectMultiple (node:net:1685:7) {
      code: 'ECONNREFUSED',
      [errors]: [Array]
    }
  }
}

Other information

I think the problem may be in requestContextInterceptor, but not sure

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@intelligentRaji intelligentRaji added the bug Something isn't working label Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
@intelligentRaji and others