21:38:01 [ERROR] [UnhandledRejection] Astro detected an unhandled rejection. Here's the stack trace:
Error: ELOOP: too many symbolic links encountered, lstat '/nix/store/npzkc6q10x37mb969v8c19klfsghb70l-apple-sdk-14.4/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncursesw/ncurses/ncursesw/ncurses/ncurses/ncurses/ncurses/ncursesw'
Hint:
Make sure your promises all have an `await` or a `.catch()` handler.
Error reference:
https://docs.astro.build/en/reference/errors/unhandled-rejection/
Stack trace:
at /Users/eveeifyeve/github/digitalbrewstudios/website/node_modules/astro/dist/vite-plugin-astro-server/plugin.js:115:66
[...] See full stack trace in the browser, or rerun with --verbose.
#Issue with using nix in astro
4 messages · Page 1 of 1 (latest)
Hi @stable pier. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Astro is reporting an UnhandledRejection because a promise inside its tooling failed with the filesystem error ELOOP: too many symbolic links encountered. The generic meaning of this Astro error is that some promise rejected without an await or .catch() handler, so Astro surfaces it as UnhandledRejection with the underlying stack. [Unhandled rejection]
However, the specific cause here (the ELOOP on a deeply nested ncursesw path in /nix/store/...) is not described in the Astro docs, and there is no Nix-specific guidance in the provided knowledge sources. I can only say with confidence:
UnhandledRejectionmeans a rejected promise was not handled; you should look at the first error in the stack trace (here, theELOOPfromlstat) to find the real cause. [Unhandled rejection]ELOOPis a filesystem error (too many symlinks) and falls under Astro’s “unknown filesystem error” category conceptually, which is described as “an unknown error occurred while reading or writing files to disk” and can be caused by things like missing permissions or problematic paths. [Unknown filesystem]
The docs do not provide:
- Any Nix-specific configuration or workaround.
- Any instructions for excluding Nix store paths from Astro/Vite’s file scanning.
Given these limits, the best next steps (based on the docs) are:
- Treat this as a tooling bug / environment interaction and create a minimal reproduction (e.g. a fresh Astro project in your Nix environment) to confirm it’s reproducible. [Creating reproductions]
- If reproducible, open an issue on Astro’s GitHub, including:
- Your Nix setup details.
- The full stack trace.
- A link to the minimal reproduction. [Creating reproductions]