angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

i got an error while running angular cli by using "ng serve"-"You have to be inside an angular-cli project in order to use the serve command." But i am in the particular folder.

Open santhoshkumarch opened this issue 9 years ago • 7 comments

i got an error while running angular cli by using "ng serve"-"You have to be inside an angular-cli project in order to use the serve command." But i am in the particular folder

santhoshkumarch avatar Apr 18 '17 12:04 santhoshkumarch

@santhoshkumarch You should run the command inside Angular CLI project you created. Make sure you have .angular-cli.json file in the folder from which you are running the command.

sumitarora avatar Apr 18 '17 14:04 sumitarora

Based on the error message, it appears you are using an older version of the CLI. I would recommend upgrading to the latest version.

npm uninstall -g angular-cli
npm cache clean
npm install -g @angular/cli

delasteve avatar Apr 18 '17 15:04 delasteve

Thank you @delasteve ! You are an absolute gem!

I have run those identical commands a few times to try and resolve this issue; with the exception being that I have not done it with the -g flag. Rookie mistake I suppose.

cgosiak avatar May 03 '17 11:05 cgosiak

Closing as above.

sumitarora avatar May 04 '17 00:05 sumitarora

Finally it works :) Thank you @delasteve

ylcinyakup avatar Nov 10 '17 12:11 ylcinyakup

npm install -g @angular/cli@latest

SunaliBandara avatar Jun 28 '18 18:06 SunaliBandara

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.