0

I've downloaded a project from a friend and when I start the project using ng serve... It gives me error saying

The serve command requires to be run in an Angular project, but a project definition could not be found.

I'm pretty sure I am in the root folder. I also tried several commands I found on my hours of searching such as.. updating, uninstalling, and re-installing angular/cli... I've also tried npm update @angular/cli --migrate-only --from=9.1.8, but nothing seems to work.

Note : this project runs on localhost:4200

Btw, I have another angular project that also runs on 4200 and it runs successfully using ng serve.
Does this have to do on why I am not able to run the downloaded angular project?

darogo
  • 51
  • 1
  • 7
  • Have both the projects on same angular version? also try clearing cache using the command `npm cache clean -f` – Pardeep Jain Jun 11 '20 at 04:18
  • @PardeepJain I just noticed, they have different angular versions. I already tried `npm cache clean -f` but no still no luck. – darogo Jun 11 '20 at 04:21
  • okay, might be the case you need to install different angular CLI as per the angular versions of your projects. also, you can use `nvm` to handle different versions on a same machine. – Pardeep Jain Jun 11 '20 at 04:22
  • @PardeepJain I'm sorry but can you provide ang example :) – darogo Jun 11 '20 at 04:26
  • https://stackoverflow.com/q/43018777/5043867 might help you out . – Pardeep Jain Jun 11 '20 at 04:31

0 Answers0