Open mattgek opened 3 years ago
@mattgek Waiting for your PR on this 🙂 I think that in case that a default project doesn't exists, prompt a list selection input so the user can select a project from the existing projects.
@shaharkazaz maybe a stupid question but you have 4 different branches master, V2, V3 and V12. I assume V3 won't be the branch I need but from which branch do I need to create a new one? I saw master is still on angular 7 and v12 on the latest so I assume v12 is the correct one? Can you confirm?
@mattgek Please create a branch from master
.
I'm currently in the middle of upgrading our entire infrastructure. v3
includes all the upgrades (including Angular v12) but it will take a couple more days until it's merged.
@mattgek Do you still plan to create the PR for this issue? 🙂
To probably help others who google and to put some weight on this: I was hit by this situation as well
The package @ngneat/transloco@4.1.1 will be installed and executed.
Would you like to proceed? Yes
✔ Packages successfully installed.
? 🌍 Which languages do you need? en,de
? 🚀 Are you working with server side rendering? No
Cannot read property 'projectType' of undefined
I'm using Angular 14. To circumvent this issue, I temporarily added
{
...
"defaultProject": "xyz"
}
to my angular.json
I also faced this error a few months ago as I'm authoring a bunch of schematics.
I explained why and the solution in the tip
section here : ngx-schematics-utilities#usage
I will create a PR for that 😉
Current behavior
Executing ng add @ngneat/transloco in an Angular or an Nrwl Nx Angular were angular.json doesn't have a defaultProject value assigned results in error Cannot read property 'projectType' of undefined
Expected behavior
A clear message that project is required in that case.
Minimal reproduction of the problem with instructions
Screenshots
Environment