Closed Abdulali97 closed 7 months ago
Thanks for detailing the issue. I was able to reproduce it.
Fixed in 17.1.2, could you please test it?
Note when using Nx: https://github.com/chihab/dotenv-run/issues/47#issuecomment-1880077237
@chihab Tested with version 17.1.2 and the issue is fixed. Thank you for the quick fix!
I'm currently facing an issue with @ngx-env/builder. During the build(production) process, an error shows up that says the builder couldn't find the file index.server.html. Here's the error message I'm getting:
and it just works! even with this error I can use .env and pass the env variable during the build :)
However, my index.server.html file seems to be correctly generated and is located on this path
After doing a bit of digging, it looks like the issue stems from how @ngx-env/builder is trying to construct the path to index.server.html. It seems to be basing this on our project's current working directory but is not correctly considering the output directory setting from the project.json file (which is dist/apps/client). Here's the setting from the buildWithPlugin function in @ngx-env/builder/dist/builders/application/index.js:
(0, esbuild_index_html_1.indexHtml)((0, path_1.join)(cwd, options.outputPath.toString()), raw, !!options.ssr);
From my understanding, the outcome of the above is
apps/client/dist/apps/client
but according to our project.json, it should be justdist/apps/client
I'm not sure how to go about resolving this issue. If anyone has encountered a similar issue or has any guidance, it would be greatly appreciated.
additional details folder tree sample
project.json
package.json