0

I updated to angular 7 and im getting this error when trying to create a new angular project.

ng new error:

image

angular version:

image

Triyugi Narayan Mani
  • 3,039
  • 8
  • 36
  • 56

3 Answers3

1

You try with --version option For example

ng new test-app --version 7

This solution is definitely working for you

Suhag Lapani
  • 655
  • 10
  • 18
0

"New project names must start with a letter, and must contain only alphanumeric characters or dashes. When adding a dash the segment after the dash must also start with a letter.

Invalid- new_something

Valid- new-something"

I'd advise you change your naming convention

try: angular-project

WebStorm: New AngularCli Project: Error: directory should match format "path"

Rogelio
  • 953
  • 2
  • 10
  • 19
  • then most likely a failed install try npm uninstall @angular/cli -g npm install @angular/cli -g also try reading this answer hopefully it provides a solution for you https://stackoverflow.com/questions/50198408/ng-new-has-stopped-working-after-updating-to-angular-6 – Rogelio Oct 25 '18 at 08:35
0

Problem Solved:

there was a folder named "node_modules" in my home directory. deleting it solved the case.

for more refer: ng new has stopped working after updating to Angular 6

  • I hope you actually understood the problem. The "node_modules" is the folder that's installed when you install npm. Most probably when you installed version 6 and then updated to version 7, the folder did not update and hence the error. So deleting it caused to create a new one. Also you can mark your answer as correct since it solved the problem. – Richard Pariath Oct 25 '18 at 09:26