Closed charl-kruger closed 4 years ago
@CharlJKruger We had that excact same issue last week coming up (creating apps and libs was not possible anymore after the upgrade). After struggling through the codebase we found out that we had some old schematics inside the angular.json
as base schematics for the project.
ng g lib ui
? Which stylesheet format would you like to use? SASS(.scss) [ http://sass-lang.com ]
Path "/libs/ui/src/lib/ui.service.spec.ts" does not exist.
Removal of old schematic references inside angular.json
made this work again.
For reference, we had this section inside the root of our angular.json (near the bottom of the file):
...
"schematics": {
"@schematics/angular:component": {
"styleext": "scss",
"spec": false
},
"@schematics/angular:class": {
"spec": false
},
"@schematics/angular:directive": {
"spec": false
},
"@schematics/angular:guard": {
"spec": false
},
"@schematics/angular:module": {
"spec": false
},
"@schematics/angular:pipe": {
"spec": false
},
"@schematics/angular:service": {
"spec": false
}
},
...
Hope this helps!
@fen89 this is a good catch. I'll update the guide. Are you interested in submitting a PR that updates the migration?
Pushed the updated docs to master.
I am still able to replicate this issue. Removing the old schematic references also doesn't seem to resolve the issue.
Angular CLI: 8.3.18 Node: 10.15.0 OS: win32 x64 Angular: 8.2.13 ... animations, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... platform-server, router, service-worker
@angular-devkit/architect 0.803.18 @angular-devkit/build-angular 0.803.18 @angular-devkit/build-optimizer 0.803.18 @angular-devkit/build-webpack 0.803.18 @angular-devkit/core 8.3.18 @angular-devkit/schematics 8.3.3 @angular/cdk 8.2.3 @angular/cli 8.3.18 @angular/pwa 0.13.9 @ngtools/webpack 8.3.18 @nguniversal/module-map-ngfactory-loader 8.1.1 @schematics/angular 7.3.9 @schematics/update 0.803.18 rxjs 6.5.3 typescript 3.5.3 webpack 4.39.2
For anyone else struggling with my last comment. A temporary workaround is to edit
node_modules/@nrwl/angular/src/schematics/application/application.js
and comment out
host.delete(${e2eProjectRoot}/src/app.e2e-spec.ts
);
host.delete(${e2eProjectRoot}/src/app.po.ts
);
host.delete(${e2eProjectRoot}/protractor.conf.js
);
host.delete(${e2eProjectRoot}/tsconfig.json
);
@vsavkin I somehow missed the github notification on this one, sorry for the delay. As @FintanK pointed out there might be some more issues related to that upgrade. Could you provide me an entry point where I should start to implement that kind of migration? I really would like to try to contribute as I'm really enjoying nx!
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.
Expected Behavior
After upgrading from nx 7 (@nrwl/nx": "^7.8.6) to nx 8 via https://nx.dev/angular/guides/nx7-to-nx8, application compiles successfully however we cannot generate new applications :(
These were the steps taken from the above guide:
Running either of the below should complete successfully:
ng g app myapp
ng g @nrwl/angular:application myapp
Current Behavior
App fails to create, nothing is generated.
Failure Information (for bugs)
Error message:
Path "/myapp/e2e/src/app.e2e-spec.ts" does not exist.
Context
Please provide any relevant information about your setup: