0

i try to run front end part (Angular 2) locally by navigating to the angular folder and doing ng serve but it is giving following error

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

i tried to do ng update @ angular / cli but itis giving this error Package not installed: "@angular/cli". Skipping. i need help Thank you so much in advance.

Angular CLI: 7.0.4
Node: 10.6.0
OS: win32 x64
Angular: 7.0.2
... common, compiler, compiler-cli, core, forms, http
... platform-browser, platform-browser-dynamic, router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    <error>
@angular-devkit/core         <error>
@angular-devkit/schematics   <error>
@angular/tsc-wrapped         0.5.2
@ngtools/webpack             1.10.2
@schematics/angular          <error>
@schematics/update           <error>
rxjs                         6.3.3
typescript                   3.1.6
webpack                      2.1.0-beta.25


{
  "name": "angular-src",
  "version": "0.0.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "test": "ng test",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "protractor"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^7.0.2",
    "@angular/compiler": "^7.0.2",
    "@angular/core": "^7.0.2",
    "@angular/forms": "^7.0.2",
    "@angular/http": "^7.0.2",
    "@angular/platform-browser": "^7.0.2",
    "@angular/platform-browser-dynamic": "^7.0.2",
    "@angular/router": "^7.0.2",
    "angular2-flash-messages": "^3.0.1",
    "angular2-jwt": "^0.2.3",
    "bootstrap": "^4.1.3",
    "core-js": "^2.4.1",
    "rxjs": "^6.3.3",
    "ts-helpers": "^1.1.1",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular/compiler-cli": "^7.0.2",
    "@types/jasmine": "2.8.11",
    "@types/node": "^10.12.2",
    "angular-cli": "1.0.0-beta.28.3",
    "codelyzer": "~4.5.0",
    "jasmine-core": "3.3.0",
    "jasmine-spec-reporter": "4.2.1",
    "karma": "3.1.1",
    "karma-chrome-launcher": "^2.0.0",
    "karma-cli": "^1.0.1",
    "karma-jasmine": "^1.0.2",
    "karma-remap-istanbul": "^0.6.0",
    "protractor": "~5.4.1",
    "ts-node": "7.0.1",
    "tslint": "^5.11.0",
    "typescript": "~3.1.6"
  }
}
R. Richards
  • 24,603
  • 10
  • 64
  • 64
  • 4
    Possible duplicate of [Angular Cli Error: The serve command requires to be run in an Angular project, but a project definition could not be found](https://stackoverflow.com/questions/53096996/angular-cli-error-the-serve-command-requires-to-be-run-in-an-angular-project-b) – jonrsharpe Nov 07 '18 at 13:46
  • @jonrsharpe when i run ng update @angular/cli --migrate-only --from=1.7.4 ihave tis error Package not installed: "@angular/cli". Skipping. We analyzed your package.json and everything seems to be in order. Good work! –  Nov 07 '18 at 13:50
  • some one help me i dont have a solution –  Nov 07 '18 at 14:06
  • @khoukhou You don't have `@angular/cli` in your package.json, you should install it – user184994 Nov 07 '18 at 15:04
  • @user184994 how i install it –  Nov 07 '18 at 15:25
  • What version have you got installed globally? You can check with `ng --version` – user184994 Nov 07 '18 at 15:27

0 Answers0