angular4罗盘混合器导入错误与ngc

时间:2018-10-03 07:21:11

标签: angular compass

我正在尝试通过以下方式将罗盘混音导入组件.scss文件内的Angular4应用程序中:

@import '~compass-mixins/lib/compass/css3';

运行时效果很好:

ng serve

但是在运行“ ngc”命令时显示错误:

Error: Compilation failed. Resource file not found: C:/Users/eng-m/Desktop/uni-src/src/app/student-report/~compass-mixins/lib/compass/css3
at ModuleResolutionHostAdapter.readResource (C:\Users\eng-m\Desktop\uni-src\node_modules\@angular\compiler-cli\src\compiler_host.js:387:19)
at CompilerHost.loadResource (C:\Users\eng-m\Desktop\uni-src\node_modules\@angular\compiler-cli\src\compiler_host.js:250:33)
at Object.get (C:\Users\eng-m\Desktop\uni-src\node_modules\@angular\compiler\bundles\compiler.umd.js:25757:107)
at DirectiveNormalizer._fetch (C:\Users\eng-m\Desktop\uni-src\node_modules\@angular\compiler\bundles\compiler.umd.js:14104:43)
at C:\Users\eng-m\Desktop\uni-src\node_modules\@angular\compiler\bundles\compiler.umd.js:14220:68
at Array.map (<anonymous>)
at DirectiveNormalizer._loadMissingExternalStylesheets (C:\Users\eng-m\Desktop\uni-src\node_modules\@angular\compiler\bundles\compiler.umd.js:14220:14)
at C:\Users\eng-m\Desktop\uni-src\node_modules\@angular\compiler\bundles\compiler.umd.js:14223:26
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)

编译失败

我正在使用:

@angular/cli: 1.2.4
node: 8.11.4
os: win32 x64
@angular/animations: 4.3.4
@angular/common: 4.3.4
@angular/compiler: 4.3.4
@angular/core: 4.3.4
@angular/forms: 4.3.4
@angular/http: 4.3.4
@angular/platform-browser: 4.3.4
@angular/platform-browser-dynamic: 4.3.4
@angular/platform-server: 4.4.7
@angular/router: 4.3.4
@angular/cli: 1.2.4
@angular/compiler-cli: 4.3.4
@angular/language-service: 4.3.4

指南针:

"compass-mixins": "^0.12.10"

0 个答案:

没有答案