ng serve提供错误找不到模块“ @ angular-devkit / bsudouild-angular”

时间:2019-06-22 06:45:38

标签: angular command-line-interface devkit

我无法为Angular应用程序提供服务。当我输入ng serve。我得到的错误是“”找不到模块“ @ angular-devkit / bsudouild-angular”“

我尝试了ng upadte,它不起作用。

我正在使用的角度版本是

Angular CLI:8.0.3 节点:10.16.0 操作系统:Darwin x64 角度: ...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.800.3
@angular-devkit/core         8.0.3
@angular-devkit/schematics   8.0.3
@angular/cli                 8.0.3
@schematics/angular          8.0.3
@schematics/update           0.800.3
rxjs                         6.4.0

angular.json

{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"crud": {
  "projectType": "application",
  "schematics": {},
  "root": "",
  "sourceRoot": "src",
  "prefix": "app",
  "architect": {
    "build": {
      "builder": "@angular-devkit/bsudouild-angular:browser",
      "options": {
        "outputPath": "dist/crud",
        "index": "src/index.html",
        "main": "src/main.ts",
        "polyfills": "src/polyfills.ts",
        "tsConfig": "tsconfig.app.json",
        "aot": false,
        "assets": [
          "src/favicon.ico",
          "src/assets"
        ],
        "styles": [
          "src/styles.css"
        ],
        "scripts": []
      },
      "configurations": {
        "production": {
          "fileReplacements": [
            {
              "replace": "src/environments/environment.ts",
              "with": "src/environments/environment.prod.ts"
            }
          ],
          "optimization": true,
          "outputHashing": "all",
          "sourceMap": false,
          "extractCss": true,
          "namedChunks": false,
          "aot": true,
          "extractLicenses": true,
          "vendorChunk": false,
          "buildOptimizer": true,
          "budgets": [
            {
              "type": "initial",
              "maximumWarning": "2mb",
              "maximumError": "5mb"
            }
          ]
        }
      }
    },
    "serve": {
      "builder": "@angular-devkit/build-angular:dev-server",
      "options": {
        "browserTarget": "crud:build"
      },
      "configurations": {
        "production": {
          "browserTarget": "crud:build:production"
        }
      }
    },
    "extract-i18n": {
      "builder": "@angular-devkit/build-angular:extract-i18n",
      "options": {
        "browserTarget": "crud:build"
      }
    },
    "test": {
      "builder": "@angular-devkit/build-angular:karma",
      "options": {
        "main": "src/test.ts",
        "polyfills": "src/polyfills.ts",
        "tsConfig": "tsconfig.spec.json",
        "karmaConfig": "karma.conf.js",
        "assets": [
          "src/favicon.ico",
          "src/assets"
        ],
        "styles": [
          "src/styles.css"
        ],
        "scripts": []
      }
    },
    "lint": {
      "builder": "@angular-devkit/build-angular:tslint",
      "options": {
        "tsConfig": [
          "tsconfig.app.json",
          "tsconfig.spec.json",
          "e2e/tsconfig.json"
        ],
        "exclude": [
          "**/node_modules/**"
        ]
      }
    },
    "e2e": {
      "builder": "@angular-devkit/build-angular:protractor",
      "options": {
        "protractorConfig": "e2e/protractor.conf.js",
        "devServerTarget": "crud:serve"
      },
      "configurations": {
        "production": {
          "devServerTarget": "crud:serve:production"
        }
      }
    }
  }
}},
"defaultProject": "crud"
}

app.module.ts:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }


expected result should be working ng serve at localhost:4200

error i am getting is 

Could not find module "@angular-devkit/bsudouild-angular" from 
"/Users/raghu/crud".
Error: Could not find module "@angular-devkit/bsudouild-angular" 
from "/Users/raghu/crud".
at Object.resolve (/Users/raghu/crud/node_modules/@angular- 
devkit/core/node/resolve.js:151:11)
at WorkspaceNodeModulesArchitectHost.resolveBuilder 
(/Users/raghu/crud/node_modules/@angular-devkit/architect/node/node- 
modules-architect-host.js:31:40)
at core_1.experimental.jobs.createJobHandler 
(/Users/raghu/crud/node_modules/@angular- 
devkit/architect/src/architect.js:198:40)
at Observable.rxjs_1.Observable.subject [as _subscribe] 
(/Users/raghu/crud/node_modules/@angular- 
devkit/core/src/experimental/jobs/create-job-handler.js:91:26)
at Observable._trySubscribe 
(/Users/raghu/crud/node_modules/rxjs/internal/Observable.js:44:25)
at Observable.subscribe 
(/Users/raghu/crud/node_modules/rxjs/internal/Observable.js:30:22)
at 

/Users/raghu/crud/node_modules/rxjs/internal/util/subscribeTo.js:22:31     在Object.subscribeToResult(/Users/raghu/crud/node_modules/rxjs/internal/util/subscribeToResult.js:10:45)     在SwitchMapSubscriber._innerSub(/Users/raghu/crud/node_modules/rxjs/internal/operators/switchMap.js:65:54)     在SwitchMapSubscriber._next(/Users/raghu/crud/node_modules/rxjs/internal/operators/switchMap.js:55:14)     在SwitchMapSubscriber.Subscriber.next(/Users/raghu/crud/node_modules/rxjs/internal/Subscriber.js:66:18)     在SwitchMapSubscriber.notifyNext(/Users/raghu/crud/node_modules/rxjs/internal/operators/switchMap.js:86:26)     在InnerSubscriber._next(/Users/raghu/crud/node_modules/rxjs/internal/InnerSubscriber.js:28:21)     在InnerSubscriber.Subscriber.next(/Users/raghu/crud/node_modules/rxjs/internal/Subscriber.js:66:18)     在MapSubscriber._next(/Users/raghu/crud/node_modules/rxjs/internal/operators/map.js:55:26)     在MapSubscriber.Subscriber.next(/Users/raghu/crud/node_modules/rxjs/internal/Subscriber.js:66:18)

0 个答案:

没有答案