Angular 2 : No NgModule metadata found

后端 未结 28 1504
盖世英雄少女心
盖世英雄少女心 2020-11-30 05:31

I\'m brand new to Angular 2 and attempting to follow along with a video tutorial I found. Despite following all of the steps, Angular just won\'t work; I get the following e

28条回答
  •  庸人自扰
    2020-11-30 05:59

    With Angular 5, I solved a similar problem by ugrading to @angular/cli 1.6.1 from 1.5.5:

    "devDependencies": {
      "@angular/cli": "1.6.1"
    }
    

    During ng serve the error I got was:

    ERROR in Error: No NgModule metadata found for 'AppModule'.
        at NgModuleResolver.resolve (/path/to/project/app/node_modules/@angular/compiler/bundles/compiler.umd.js:20247:23)
    

提交回复
热议问题