Error when creating new project with Angular-CLI 6.1.2

I tried creating a new Angular project using ng new angular-6-boilerplate but I can't do it anymore with angular-cli latest version. I'm using terminal for windows to create my project but I got this error.

Schematic input does not validate against the Schema: {"name":"angular-6-boilerplate","version":"6.1.2","newProjectRoot":"projects","skipInstall":false,"linkCli":false,"skipGit":false,"commit":null} Errors:

  Data path ".name" should match format "html-selector".

Why am I getting this error?

Upvotes: 17

Views: 11789

Answers (7)

charu dhingra
charu dhingra

Reputation: 1

Try to avoid numbers and special characters while giving name of new project of angular. ng new angular-6-boilerplate Changed to --> ng new angulaBoilerplate

Upvotes: 0

Tsakiroglou Fotis
Tsakiroglou Fotis

Reputation: 1031

No Snakecase.

Watch out for underscores as well (not just lone numbers).

ng new my_fantastic_app

Is an invalid name.

And of course as other people have already say , be careful for Lone numbers between dashes

Upvotes: 15

Karar Barcha
Karar Barcha

Reputation: 406

Don't use _ (underscore) sign, use minus - (minus) sign.

For Example:

Wrong code:

ng new naytiv_admin_fe

Right code:

ng new naytiv-admin-fe

Upvotes: 2

Rajat
Rajat

Reputation: 412

Number at the end also does not work.

I had to change from

ng new Chapter-4

to

ng new Chapter4

Upvotes: 0

Ganesh Mulay
Ganesh Mulay

Reputation: 171

Do not include any special characters. You can use the hyphen ( - ) instead of it.

Upvotes: 1

Melchia
Melchia

Reputation: 24244

Do not include project name special characters or numbers. Try the following:

$ ng new angular-boilerplate

I did some research & found out that this comes from the schema responsible of creating new Angular applications Link Here

Upvotes: 37

Todd Palmer
Todd Palmer

Reputation: 1102

Melchia is correct.

But to be more specific, the problem is the lone number between the dashes.

This will also work:

ng new angular6-boilerplate

Upvotes: 7

Related Questions