chihab/dotenv-run

Impossible to use the project's builder with Angular Universal

killbond opened this issue · 3 comments

Steps to reproduce:

  • Clone any project repo with Angular Universal, I used this one: https://github.com/Angular-RU/universal-starter
  • Install all dependencies and add ngx-env dependency:
    npm install && ng add @ngx-env/builder
  • Run serving of the newly created app in ssr mode:
    npm run ssr

Expected behaviour:

  • The application successfully starts rendering

Actual behaviour:

  • The application fails with the following error:
A server error has occurred.
node exited with 1 code.
connect ECONNREFUSED 127.0.0.1:36745

Curiously, if I change @ngx-env/builder:server to @angular-devkit/build-angular:server in the server's section builder in the angular.json everything works fine

Thanks for reporting the issue @killbond. I'll have a look at it.

I can confirm, this is not working when using Angular Universal.
I am currently facing the same issue on angular v14.

Any progress with this so far?

Could you give it a try with v15.2.0 please?