-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Migrate existing .angular-cli.json to angular.json? #491
Comments
I just completed the same process. Nrwl/nx apparently doesn't do the update, but you have to do it with the proper So I did
|
@juristr But did you have to manually adjust a bunch of things in your |
I had to adjust basically this: angular/angular-cli#10883. But it seems like a bug in the Right now the project compiles, but
|
@jschwarty Yeah this is still busted on the latest version. I wish the nrwl team would outline what an angular.json file should look like after an upgrade so I could at least do it manually. Right now, it's mostly guess and check. |
@Nxt3 every lib should have the following record in angular.json:
It looks like the upgrade process fails for you. Do you see any error message when running |
@vsavkin I never see any error messages. My converted libs do not look like that. |
@Nxt3 do you remember what versions did you tried the update from?
And in order to run @vsavkin Any pointers on what would be the proper way to update/migrate a workspace from This what I've tried, before the manual upgrade (and before realizing that there should be an nx.json file):
Now, thinking that |
@MrCroft any chance you solved this? Having the same issue here. I think I upgraded in the wrong order, and now I have the old way of listing libs with Nx looking for .angular.json. |
@mcblum unfortunately, no. I couldn't manage to do it through the update process. |
I ended up writing a bash script that created the existing libs and apps from scratch in a new workspace and then had it copy our existing code over. It was a pain. |
@mcblum Sure! https://gist.github.com/Nxt3/e3964da5feb380fdbab801526ff1f2e3 So what this does is you create a new nrwl workspace somewhere. Run this script from inside that project. This script will:
You'll need to change the paths. In hindsight, I should have made a constant at the top but oh well. There are lots of inline text replacements that you may or may not need since my team has cucumber/gherkin feature tests that we were concerned with running. I'd like to think editing the script to fit your needs should be fairly straightforward though. Feel free to ask me any questions. |
Closing this issue as a lot of updates to the |
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 just tested out the new
ng update
but noticed it doesn't modify the.angular-cli.json
file. I know this functionality exists within the standard@angular/cli
but the problem is that it doesn't handle the migration as I'd expect. It lists everything as an app (regardless of whether it is a lib from nrwl) and gives everything e2e tests. I fixed most of this manually, but was hoping for an automatic way of doing this.Is there a better way currently to migrate?
The text was updated successfully, but these errors were encountered: