1.Cannot read property ‘config’ of null
缺少.angular-cli.json
- Error:Angular Compiler was detected but it was an instance of the wrong class.
This likely means you have several @ngtools/webpack packages installed. You can check this withnpm ls @ngtools/webpack
, and then remove the extra copies.
提示有多个@ngtools/webpack
删除一个就可以
3.WARNING in ./src/app/login/login.component.css
(Emitted value instead of an instance of Error) postcss-import: H:\h one\src\app\login\login.component.css:110:3: @import must precede all other statements (beside
要把@import url 把这句话放到最上边注释的下边就可以了
4.ERROR in No NgModule metadata found for ‘AppModule’.
在APP module空行按下空格键就可以了
5.angular5-懒加载问题:Uncaught (in promise): TypeError: webpack_require.e is not a function TypeError: __webpack_requi
npm remove -g @angular/cli
npm install -g @angular/cli@1.7.2
npm remove @angular/cli
npm add @angular/cli@1.7.3 --save-dev