Getting error while creating enum with Angular CLI? Is it a bug with Angular CLI?

I got the following error while trying to create enum with Angular CLI:

C:\angular\myapp\src\app\enums>ng generate enum myEnum
installing enum
Cannot read property '0' of undefined
TypeError: Cannot read property '0' of undefined
    at Object.getAppFromConfig (C:\angular\myapp\node_modules\@angular\cli\utilities\app-utils.js:4:19)
    at Class.normalizeEntityName (C:\angular\myapp\node_modules\@angular\cli\blueprints\enum\index.js:18:39)
    at Class.Blueprint._normalizeEntityName (C:\angular\myapp\node_modules\@angular\cli\ember-cli\lib\models\blueprint.js:454:24)
    at Class.Blueprint.install (C:\angular\myapp\node_modules\@angular\cli\ember-cli\lib\models\blueprint.js:513:8)
    at Class.run (C:\angular\myapp\node_modules\@angular\cli\ember-cli\lib\tasks\generate-from-blueprint.js:59:49)
    at Class.run (C:\angular\myapp\node_modules\@angular\cli\ember-cli\lib\commands\generate.js:71:17)
    at Class.<anonymous> (C:\angular\myapp\node_modules\@angular\cli\ember-cli\lib\models\command.js:134:17)
    at process._tickCallback (internal/process/next_tick.js:103:7)

Is this a bug with Angular CLI?

I upgraded the CLI version from 1.0.0-rc.0 to 1.0.0-rc.1 and it worked. Not sure if it was a bug, but updating to the latest version fixed the issue.

Learn how to Generate Class, Interface and Enumerations using Angular CLI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s