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

Generating a nestjs app targeting a directory create the e2e project with the wrong name #18806

Closed
1 of 4 tasks
carantes opened this issue Aug 24, 2023 · 5 comments
Closed
1 of 4 tasks
Labels
blocked: retry with latest Retry with latest release or head. outdated scope: node Issues related to Node, Express, NestJS support for Nx stale type: bug

Comments

@carantes
Copy link

Current Behavior

Created a new Nestjs app targeting a directory using the following command

nx g @nx/nest:app myservice --directory services

The new app was bootstrapped correctly inside of the apps/services folder but the e2e app was created with a wrong name: services-myservice-e2e.

NX version: v16.7.2``

Expected Behavior

The e2e app was created in the right folder but with an incorrect name, it should be the same name defined to myservice.

/apps/services/myservice

GitHub Repo

No response

Steps to Reproduce

  1. Create a new NX workspace
    npx create-nx-workspace myworkspace --preset=nest

  2. Create a new NestJS app targeting a directory

nx g @nx/nest:app myservice --directory services

Nx Report

nx report

 >  NX   Configuration Error

   The following implicitDependencies point to non-existent project(s):
     gateway-e2e
       gateway

Failure Logs

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@carantes
Copy link
Author

carantes commented Aug 24, 2023

Also the project name in the project.json file was created with the directory appended to it, I had to manually change it. After change it the configuration error in the nx report disappeared.

@FrozenPandaz
Copy link
Collaborator

I think this was unintentionally fixed by #18701.

Could you check this behavior on 16.8.0-beta.2?

@FrozenPandaz FrozenPandaz added scope: node Issues related to Node, Express, NestJS support for Nx blocked: retry with latest Retry with latest release or head. labels Aug 24, 2023
@github-actions
Copy link

github-actions bot commented Sep 8, 2023

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Sep 8, 2023
@carantes
Copy link
Author

carantes commented Sep 8, 2023

@FrozenPandaz I retested it on v16.8.1 and it works if you use the full path, including the service name on the --directory flag:

nx g @nx/nest:app myservice --directory apps/services/myservice

Screenshot 2023-09-08 at 09 06 45

@carantes carantes closed this as completed Sep 8, 2023
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

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 Oct 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: retry with latest Retry with latest release or head. outdated scope: node Issues related to Node, Express, NestJS support for Nx stale type: bug
Projects
None yet
Development

No branches or pull requests

2 participants