Skip to content
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

angular-nest app created with create-nx-workspace fails to run #9213

Closed
cichy380 opened this issue Mar 6, 2022 · 3 comments
Closed

angular-nest app created with create-nx-workspace fails to run #9213

cichy380 opened this issue Mar 6, 2022 · 3 comments

Comments

@cichy380
Copy link

cichy380 commented Mar 6, 2022

I just generated fresh app by command npx create-nx-workspace --preset=angular-nest. This operation installed Angular 13.2.0 and Nestjs 8.0.0. I did not found documentation about "how to start the applications" so I check package.json and use found stript "start".

Current Behavior

I want to run installed aplication, so I wrote npm start. Frontend application up, but on http://localhost:4200 I see only "Welcome to travelmaker-app!" and "Message: null" because API is dead.

Expected Behavior

I expected some script to start API or that API will start after command npm start

Steps to Reproduce

  • npx create-nx-workspace --preset=angular-nest
  • npm start

Failure Logs

In command line I see <e> [webpack-dev-server] [HPM] Error occurred while proxying request localhost:4200/api/hello to http://localhost:3333/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)

Environment

   Node : 14.17.6
   OS   : win32 x64
   npm  : 6.14.15

   nx : 13.8.4
   @nrwl/angular : 13.8.4
   @nrwl/cli : 13.8.4
   @nrwl/cypress : 13.8.4
   @nrwl/detox : undefined
   @nrwl/devkit : 13.8.4
   @nrwl/eslint-plugin-nx : 13.8.4
   @nrwl/express : undefined
   @nrwl/jest : 13.8.4
   @nrwl/js : 13.8.4
   @nrwl/linter : 13.8.4
   @nrwl/nest : 13.8.4
   @nrwl/next : undefined
   @nrwl/node : 13.8.4
   @nrwl/nx-cloud : 13.1.6
   @nrwl/react : undefined
   @nrwl/react-native : undefined
   @nrwl/schematics : undefined
   @nrwl/storybook : 13.8.4
   @nrwl/tao : 13.8.4
   @nrwl/web : undefined
   @nrwl/workspace : 13.8.4
   typescript : 4.5.5
   rxjs : 7.4.0
   ---------------------------------------
   Community plugins:
         @angular/animations: 13.2.5
         @angular/common: 13.2.5
         @angular/compiler: 13.2.5
         @angular/core: 13.2.5
         @angular/forms: 13.2.5
         @angular/platform-browser: 13.2.5
         @angular/platform-browser-dynamic: 13.2.5
         @angular/router: 13.2.5
         @angular-devkit/build-angular: 13.2.5
         @angular/cli: 13.2.5
         @angular/compiler-cli: 13.2.5
         @angular/language-service: 13.2.5

@cichy380
Copy link
Author

cichy380 commented Mar 8, 2022

This problem is with BUG which was fixed by pull request #9177

so, in Nx ver. 13.8.5 API can be run without problem

[Terminal 1]: npm run ng -- serve your-app-name or just npm run start
[Terminal 2]: npm run ng -- serve api

@cichy380 cichy380 closed this as completed Mar 8, 2022
@gRoussac
Copy link

gRoussac commented Oct 6, 2022

Hi,

I don't see how this PR fixes the issue you describe.

Seems to me a bit surprising to have the api failing on starting the just installed project.

How are we supposed to guess that we need to change scripts.start ?

nx run-many --target=serve --projects=my-app-name,api --parallel=2

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants