1

So basically if I type the command "ng serve" inside the terminal and inside the right workspace. (I also tried "sudo ng serve") I get the following error for some reason : Error: This command is not available when running the Angular CLI outside a workspace.

Can someone help me please?!

Jarno Looij
  • 29
  • 1
  • 6

2 Answers2

1

i got this error when i typed ng new projectName in the terminal to start a new project and i solve it just by deleting all the directories and files of the old project. It works fine after that. PS: my error was "This command is not available when running the Angular CLI inside a workspace." not outside a workspace.

0

Find the angular.json file in your project. Run ng serve in that folder.

starball
  • 20,030
  • 7
  • 43
  • 238
Timber Hjellum
  • 330
  • 2
  • 7