angular - ng build/serve not working 模板中的错误
问题描述
在尝试构建/服务使用 nx/Angular 8 创建的应用程序时遇到问题。有 3 个问题:
WARNING in Entry point '@angular/material' contains deep imports ... (rxjs/observable)
ERROR in template must be a string
i 「wdm」: Failed to compile.
解决问题的任何帮助表示赞赏。
浏览器显示:Cannot GET /
完整的错误是:
ng serve abc-app
0% compiling
Compiling @angular/material : es2015 as esm2015 10% building 3/3 modules 0 activei 「wds」: Project is running at http://localhost:4200/webpack-dev-server/
i 「wds」: webpack output is served from /
i 「wds」: 404s will fallback to //index.html
chunk {main} main.js, main.js.map (main) 2.01 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 155 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.09 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 1.82 MB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 340 kB [initial] [rendered]
Date: 2019-08-14T02:06:54.559Z - Hash: 352c09b777f8eeb3654d - Time: 12744ms
WARNING in Entry point '@angular/material' contains deep imports into 'C:/ui/node_modules/rxjs/Subject', 'C:/ui/node_modules/rxjs/Subscription', 'C:/ui/node_modules/rxjs/observable/fromEvent', 'C:/ui/node_modules/rxjs/observable/merge', 'C:/ui/node_modules/rxjs/observable/of', 'C:/ui/node_modules/rxjs/Observable', 'C:/ui/node_modules/rxjs/observable/throw', 'C:/workspace/ui/node_modules/rxjs/observable/forkJoin'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
ERROR in template must be a string
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
i 「wdm」: Failed to compile.
解决方案
推荐阅读
- ios - Xcode 11.5 存档构建失败颤动
- r - 使用双循环创建数据框
- laravel - Eloquent:连接语句中的列不正确
- javascript - 如何将 Django 模板变量传递给 JavaScript 函数
- tomcat - HTTP 状态 404 - /OpenKM --Apache Tomcat/7.0.52 (Ubuntu),
- pam - 在服务器之间迁移 Google Authenticator 密钥
- mongodb - 从 MongoWriteException 获取错误代码,重复键错误
- angular - Angular 9 通用服务器端渲染 (SSR) 错误 HTMLCanvasElement
- flutter - Flutter Routes Emulators 不断渲染“/”而不是 InitialRoute
- php - 在索引页 laravel 中处理横幅