-
Notifications
You must be signed in to change notification settings - Fork 17
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
Support assets in a sibling directory #42
Comments
This was fixed by bumping to 1.2 ! 🚀 |
@JeanMeche, thanks for opening the issue! The application is loading properly, but I encountered an error while building the app. The error is: Error: ENOENT: no such file or directory, scandir '/home/dl/elysia-static-bugs/.angular/prerender-root/browser' Here’s the full output from the build process: /home/dl/elysia-static-bugs/node_modules/.bin/nx run app:build
> nx run app:build:production
Error: ENOENT: no such file or directory, scandir '/home/dl/elysia-static-bugs/.angular/prerender-root/browser'
at async readdir (node:internal/fs/promises:950:18)
at async xd (file:///home/dl/elysia-static-bugs/.angular/prerender-root/24ad1a33-bc90-456d-a021-f501fd639e6a/server.mjs:316:16758)
at async Id (file:///home/dl/elysia-static-bugs/.angular/prerender-root/24ad1a33-bc90-456d-a021-f501fd639e6a/server.mjs:316:17397)
at async _i.drain (file:///home/dl/elysia-static-bugs/.angular/prerender-root/24ad1a33-bc90-456d-a021-f501fd639e6a/server.mjs:8:43953) {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/home/dl/elysia-static-bugs/.angular/prerender-root/browser'
}
Error: ENOENT: no such file or directory, scandir '/home/dl/elysia-static-bugs/.angular/prerender-root/browser'
at async readdir (node:internal/fs/promises:950:18)
at async xd (file:///home/dl/elysia-static-bugs/.angular/prerender-root/59adf74f-e832-4d1c-8571-52631a8a516b/server.mjs:316:16758)
at async Id (file:///home/dl/elysia-static-bugs/.angular/prerender-root/59adf74f-e832-4d1c-8571-52631a8a516b/server.mjs:316:17397)
at async _i.drain (file:///home/dl/elysia-static-bugs/.angular/prerender-root/59adf74f-e832-4d1c-8571-52631a8a516b/server.mjs:8:43953) {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/home/dl/elysia-static-bugs/.angular/prerender-root/browser'
}
Browser bundles
Initial chunk files | Names | Raw size | Estimated transfer size
main-GFSKVUMT.js | main | 217.62 kB | 60.04 kB
styles-YYJXJO7S.css | styles | 4.66 kB | 1.17 kB
| Initial total | 222.28 kB | 61.21 kB
Server bundles
Initial chunk files | Names | Raw size
main.server.mjs | main.server | 725.71 kB |
server.mjs | server | 255.82 kB |
polyfills.server.mjs | polyfills.server | 237.05 kB |
chunk-JAEHAS6C.mjs | - | 1.52 kB |
chunk-T55IDOPT.mjs | - | 976 bytes |
Lazy chunk files | Names | Raw size
chunk-PORXTWD6.mjs | xhr2 | 12.14 kB |
chunk-N3SI5I4Q.mjs | xhr2 | 12.07 kB |
Prerendered 1 static route.
Application bundle generation complete. [9.428 seconds]
Output location: /home/dl/elysia-static-bugs/dist/apps/app
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
NX Successfully ran target build for project app (10s)
Process finished with exit code 0 It seems the build is expecting a browser directory in the .angular/prerender-root path, which is missing. Dear devs, let me know if you'd like me to open a new issue for this. |
@draylegend I couldn't reproduce the issue. Could you try to delete |
@JeanMeche I'm using WSL2 with debian 12 and bun 1.1.42. I deleted |
I have too, I just missed it as it doesn't break the build. It might be worth reporting to the angular/cli repo directly. |
Reported in angular/angular-cli#29227 |
I was trying to use elysia in combination of Angular SSR.
Here is basically my server config.
When building an SSR app, Angular generates 2 bundles, a server and a static csr one:
./server
./browser
The forementioned server config is located in the
server
directory and as you can see, we need to pull the static asset from the../browser
directory, a sibling of the parent directory.And it seems like that
elysia-static
doesn't support that.The text was updated successfully, but these errors were encountered: