You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Failed to replace variables in /Users/abdulali/dev/silicon/apps/client/dist/apps/client/server/index.server.html
Error: ENOENT: no such file or directory, open '/Users/abdulali/dev/silicon/apps/client/dist/apps/client/server/index.server.html'
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:
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
The text was updated successfully, but these errors were encountered: