x)- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] devkit
- [ ] schematics
(Unsure at this time which area it affects.)
Node: 8.11.3
npm: 6.1.0
Angular CLI (global): 6.0.8
When ng update @angular/cli is run on an Angular 5 project, the angular.json file that gets generated has an improper setting in the e2e section of the configuration that interferes with the behavior of ng generate.
"test-ng5-app-e2e": {
"root": "",
"sourceRoot": "e2e",
...
}
Steps:
npm install @angular/[email protected])ng update @angular/cli on the projectng generate service test --dry-runng generate component test --dry-run$ ng g s test --dry-run
CREATE e2e/app/test.service.spec.ts (362 bytes)
CREATE e2e/app/test.service.ts (133 bytes)
NOTE: Run with "dry run" no changes were made.
$ ng g c test --dry-run
Could not find an NgModule. Use the skip-import option to skip importing in NgModule.
ng generate works correctly out of the box on an upgraded application.
The simplest version would be to have the default settings match the initial settings for a newly-generated Angular 6 project.
"test-ng6-app-e2e": {
"root": "e2e/",
...
}
I first ran across the fix in this StackOverflow comment. I have reproduced this fix in my own project, and ng generate is now working as expected.
This is actually fixed in master and will be included in 6.1. However, thank you for the detailed issue reported.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
This is actually fixed in master and will be included in 6.1. However, thank you for the detailed issue reported.