ng generate component fails
See original GitHub issueI created a new project with the latest angular-cli npm packages 0.0.25 and can’t generate a component?
c:\temp\app5>ng generate component comp1
installing component
Cannot read property 'indexOf' of undefined
TypeError: Cannot read property 'indexOf' of undefined
at Class.module.exports.normalizeEntityName (c:\temp\app5\node_modules\angular-cli\addon\ng2\blueprints\component\index.js:19:19)
at Class.Blueprint._normalizeEntityName (c:\temp\app5\node_modules\angular-cli\node_modules\angular-cli\lib\models\blueprint.js:434:24)
at Class.Blueprint.install (c:\temp\app5\node_modules\angular-cli\node_modules\angular-cli\lib\models\blueprint.js:492:8)
at Class.module.exports.Task.extend.run (c:\temp\app5\node_modules\angular-cli\node_modules\angular-cli\lib\tasks\generate-from-blueprint.js:60:49)
at Class.module.exports.Command.extend.run (c:\temp\app5\node_modules\angular-cli\node_modules\angular-cli\lib\commands\generate.js:77:17)
at Class.<anonymous> (c:\temp\app5\node_modules\angular-cli\node_modules\angular-cli\lib\models\command.js:151:17)
at lib$rsvp$$internal$$tryCatch (c:\temp\app5\node_modules\angular-cli\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (c:\temp\app5\node_modules\angular-cli\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1048:17)
at c:\temp\app5\node_modules\angular-cli\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:331:11
at lib$rsvp$asap$$flush (c:\temp\app5\node_modules\angular-cli\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1198:9)
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Angular 4 Generate Component error - Stack Overflow
I am trying to create new Component using angular CLI. command : ng generate component myFolder/newComponent But I am getting below error: Error ......
Read more >ng generate error · Issue #10653 · angular/angular-cli - GitHub
So I think when using ng g c home --project projName, if the projName is not placed under "projects" folder, the generated path...
Read more >NG8001: Unknown HTML element or component - Angular
If the component is declared in an NgModule (meaning that it is not standalone) make sure that it is exported correctly from it,...
Read more >ng: command not found (Angular) error [Solved] | bobbyhadz
To solve the error "ng: command not found", install the angular cli package globally by running npm install -g @angular/cli@latest and restart your...
Read more >Identify and Fix Build and Deployment Errors in Your Angular ...
Many common build errors may occur as a result of rebuilding your app while using ng serve or running ng build or ng...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Brocco very true, but I thought it might be handy to post for anybody that’s stuck waiting for the next release
@pierreboissinot It’s a windows cmd console specific issue. Which is to say, works on linux and windows with gitbash just fine. We’ll fix it.