Angular 2 : No NgModule metadata found

后端 未结 28 1477
盖世英雄少女心
盖世英雄少女心 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:53

    The issue is fixed only when re installed angular/cli manually. Follow following steps. (run all command under Angular project dir)

    1)Remove webpack by using following command.

    npm remove webpack
    

    2)Install cli by using following command.

    npm install --save-dev @angular/cli@latest
    

    after successfully test app, it will work :)

    if not then follow below steps.

    1) Delete node_module folder.

    2) Clear cache by using following command.

    npm cache clean --force
    

    3) Install node packages by using following command.

    npm install
    

    4)Install angular@cli by using following command.

    npm install --save-dev @angular/cli@latest
    

    Note :if failed,try again :)

    5) Celebrate :)

提交回复
热议问题