Click here to Skip to main content
15,311,151 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have been assigned a task where I have to run ng serve command in folder.

I have installed node.js and checked it's version. Run this command npm install -g @angular/core @angular/cli

I have following folder structure.

ProjectFolder - > ClientApp - >Src
                            -> dist
                            -> e2e

I am running this command inside ProjectFolder and I am getting this error.The serve Command requires to be angular project but project definition could not found.

Is my path is wrong? In which folder shall I run this command ? ClientApp or Src?

If I make new project and serve this ng serve,it is working.

So I tried to run project inside ClientApp

When I am running ng serve inside clientApp,getting msg :An unhandled exception occurred:

Cannot find module

'@angular-devkit/build-angular/package.json' Require stack: .

So many error like AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js

\AppData\Roaming\npm\node_modules\@angular\cli\utilities\json-schema.js

AppData\Roaming\npm\node_modules\@angular\cli\lib\init.js

AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
I have taken my project from live devops directory.

It don't have node_modules folder in project.

Do that folder is necessary?

Do I need run npm install command?

Inside which folder?ClientApp?


What I have tried:

I have tried ng serve inside ProjectFolder and ClientApp.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900