【发布时间】:2022-08-03 03:47:52
【问题描述】:
当运行 ng serve 我有这个结果:
*./src/main.ts - 错误:模块构建失败 (来自./node_modules/@ngtools/webpack/src/ivy/index.js) ../.component.scss:17:100:错误:未终止的字符串标记
*./src/polyfills.ts` - 错误:模块构建失败 (来自./node_modules/@ngtools/webpack/src/ivy/index.js) ../.component.scss:17:100:错误:未终止的字符串标记
这个角度版本
角 CLI:14.0.6 节点:16.16.0 包管理器:NPM 8.14.0 操作系统:win32 x64 角度:14.0.6 包版本 -------------------------------------------------- -------- @angular-devkit/架构师 0.1400.6 @angular-devkit/build-angular 14.0.6 @angular-devkit/核心 14.0.6 @angular-devkit/原理图 14.0.6 `@angular/cdk 14.0.5` @角/材料14.0.5 @nguniversal/express-engine 7.1.1 @原理图/角度 14.0.6 `rxjs 6.6.7` 打字稿4.6.4/.component.scss
input[type=text]:disabled { color: black; } .search-row { .form-group > label { font-size: 1.1em !important; color: black; } } .mat-table { th.mat-header-cell { font-size: 1.1em !important; color: black; } }//<< here line 17. #block { margin: 0% 10%; } ...谢谢您的帮助
-
../.component.scss 中的第 17 行是什么样的? (您发布的信息中有一些奇怪的字符串标记让我感到不舒服,但可能是无关的。例如
*./src/polyfills.ts[string token] Error: Module build failed) -
我解决了,我认为这与我的
angular.json文件有关。 -
您介意分享您在
angular.json文件中所做的更改吗?
标签: css angular sass node-sass