Change npmScope?
I read through the documentation and also watched the course, but I haven't been able to find a command to change the npmScope. I tried just changing the name in nx.json, but that did not do anything, it is still the same scope as it was when I created the project.
P.S. this is one of the best packages (? not sure if that's the correct term for this project) I have ever used. Super simple to set up and almost everything just plain works. This is exactly what I needed, and I didn't know I needed it (or even existed) until I found it on Reddit. Thank you to the team who created this. I am in love with it.
Hi @jjreynoldsMatric!
Thank you for using Nx and liking it! 😀
About changing the npmScope, we're not sure to understand what you want to achieve. Can you elaborate on that please?
We usually don't want to change it, as it is attached to your current Nx workspace.
I appreciate the response. I'll try to explain my situation.
I created a non-Nx Angular app called "normal-user-frontend". I found Nx and decided to try it, so I used "ng add @nrwl/schematics" in my "normal-user-frontend" project. Everything transferred over correctly and I was able to add another project - "warehouse-user-frontend" to the workspace.
So now that there is more than one frontend project in the Nx Workspace, it doesn't really make sense to have the npmScope be "@normal-user-frontend". I would like it to be named "@warehouse-req-frontends" or something similar.
It is mostly semantic, as everything is working with the current npmScope, but I think it will save confusion if it was renamed.
Hi @jjreynoldsMatric
Is it possible that you are looking for the --npmScope option? you can do that when you convert the normal-user-frontend project, but you have to go a step back and run it on the pre-nx project:
ng add @nrwl/schematics --npmScope warehouse-req-frontends
... but you can also change it after the conversion at the tsconfig.json from the root of the project (the paths entry) and at nx.json as you mentioned
@skydever THANK YOU! I didn't realize there was an entry in the tsconfig.json I had to change as well. Now it works exactly how I want it to. I appreciate your help. Thanks to @bcabanes as well
Thank you @skydever for the answers. Closing the 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.