Angular 2 : No NgModule metadata found

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

    I finally found the solution.

    1. Remove webpack by using following command.
    npm remove webpack
    
    1. 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
    
    1. Install node packages by using following command.
    npm install
    
    1. Install angular@cli by using following command.
    npm install --save-dev @angular/cli@latest
    

    Note: If failed, try step 4 again. It will work.

提交回复
热议问题