Angular 2项目未运行错误angular / CLI

时间:2018-11-07 13:43:41

标签: node.js angular-cli

我尝试通过导航到angular文件夹并进行服务来在本地运行前端部分(Angular 2),但这会出现以下错误

“ serve命令需要在Angular项目中运行,但是找不到项目定义。”

我尝试在Angular / CLI中进行ng更新,但仍然给出此错误  未安装软件包:“ @ angular / cli”。正在跳过。 我需要帮助 谢谢你。

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"
  }
}

0 个答案:

没有答案