Closed nhhockeyplayer closed 3 years ago
Hi there @nhhockeyplayer ! Thanks for filing an issue!
I could not reproduce your issue, unfortunately... :(
When I run the nx generate @nrwl/nest:gateway
schematic, I get prompted to provide a name.
It also works fine with the --dry-run
flag.
I thought that maybe you missed something, and you accidentally provided --dry-run
as the name for the gateway. So, I tried to reproduce your case by providing as the name of the gateway a number of combinations like -dry-run
, --dry-run
, --dryRun
, -dryRun
, ---dry-run
. With -dry-run
provided as name I did get the -dry-run.gateway.ts
, but none of my combinations/trials produced a class name with a dash at the front (–dryRunGateway
).
Let me see how I can help:
npx create-nx-workspace@latest portal
b. Choose angular [a workspace with a single Angular application]
or did you choose `angular-nest [a workspace with a full stack application (Angular + Nest)]`
<img width="678" alt="Screenshot 2020-11-24 at 1 14 27 PM" src="https://user-images.githubusercontent.com/6603745/100087171-fbb5e880-2e56-11eb-910c-1f522f064fbf.png">
(not much of a difference there, I just want to make sure that we're on the same page)
c. I assume you chose the first (angular [a workspace with a single Angular application]
) and then did
yarn add -D @nrwl/nest
d. Then nx generate @nrwl/nest:app micro-root --frontend-project dashboard
Up until that point it's pretty clear.
But then, did you run
a. nx generate @nrwl/nest:gateway
and provided a name, or failed to provide a name and got an error?
b. nx generate @nrwl/nest:gateway --dry-run
and the schematic did not ask you to provide a name?
c. nx generate @nrwl/nest:gateway
and you accidentally provided -dry-run
as the name?
On my side, it asked me to provide a name every time, whether I added the --dry-run
flag on the command or not.
Please let me know of the exact steps you followed so that I can help!
Hmmm, I just saw your other issue here. So, I understand that the schematic worked fine for you in the end, but it's just the --dry-run
flag that's not working properly. :) Well, I will close this issue now, since I see that it's working on your side! I will look into the other issue now! :)
Reopening, because I found the case where it fails. Looking into it.
Please, @nhhockeyplayer , confirm that your workspace was setup like this:
CLI to power the Nx workspace (Use arrow keys)
❯ Nx [Recommended for all applications (React, Node, etc..)]
Resulting that you have a workspace.json
file and NOT a angular.json
file.This has now been fixed! Closing this issue!
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.
I thought the schematic could be a little more intuitive and coaching when fields are omitted to allow it to ask/pick
Im just feeling out where it will go
and this is where it went for this instance
nx g @nrwl/angular:app
nx generate @nrwl/nest:app micro-root --frontend-project dashboard
all is well from here builds runs fine
this is where the issue arises
nx generate @nrwl/nest:gateway
I had hoped the schematicx would prompt me but it didnt and bypassed dry-run and populated the following file into the micro-root project