css - Ember 构建时在 tmp 文件夹中找不到 Bootstrap css 文件

标签 css twitter-bootstrap ember.js

在 ember 构建时,CSS 文件不会在 app/styles 目录中生成。 Ember Build 出现的错误如下:

    "C:\Program Files\Java\jdk1.8.0_25\bin\java" -Dmaven.home=D:\JavaProjects\apache-maven-3.0.3 -Dclassworlds.conf=D:\JavaProjects\apache-maven-3.0.3\bin\m2.conf -Didea.launcher.port=7534 "-Didea.launcher.bin.path=D:\IntelliJ IDEA 14.1.7\bin" -Dfile.encoding=windows-1252 -classpath "D:\JavaProjects\apache-maven-3.0.3\boot\plexus-classworlds-2.4.jar;D:\IntelliJ IDEA 14.1.7\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=14.1.7
-DskipTests=true clean install
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building CMTEmberUI 1.0.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ CMTEmberUI ---
    [INFO] Deleting D:\sigdev\IntegrateCareManagement\CMTEmberUI\target
    [INFO] 
    [INFO] --- build-helper-maven-plugin:1.5:maven-version (add-mvn-version) @ CMTEmberUI ---
    [INFO] 
    [INFO] --- build-helper-maven-plugin:1.5:parse-version (add-mvn-version) @ CMTEmberUI ---
    [INFO] 
    [INFO] --- maven-dependency-plugin:2.8:unpack (copy) @ CMTEmberUI ---
    [INFO] Configured Artifact: org.jacoco:org.jacoco.agent:0.7.2.201409121644:jar
    [INFO] Unpacking C:\Users\dt202197\.m2\repository\org\jacoco\org.jacoco.agent\0.7.2.201409121644\org.jacoco.agent-0.7.2.201409121644.jar to D:\sigdev\IntegrateCareManagement\CMTEmberUI\target\jacoco with includes "" and excludes ""
    [INFO] 
    [INFO] --- maven-resources-plugin:2.6:copy-resources (liquibase) @ CMTEmberUI ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory D:\sigdev\IntegrateCareManagement\CMTEmberUI\src\main\resources
    [INFO] 
    [INFO] --- maven-resources-plugin:2.6:copy-resources (liquibase-test) @ CMTEmberUI ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory D:\sigdev\IntegrateCareManagement\CMTEmberUI\src\test\resources
    [INFO] 
    [INFO] --- maven-surefire-plugin:2.11:test (unit-tests) @ CMTEmberUI ---
    [INFO] Tests are skipped.
    [INFO] 
    [INFO] --- maven-antrun-plugin:1.7:run (ember-cli) @ CMTEmberUI ---
    [INFO] Executing tasks

    building:
         [echo] *** NPM INSTALL ***
         [echo] *** BOWER INSTALL ***
         [echo] *** EMBER production BUILD ***
         [exec] 
         [exec] Running without elevated rights. Running Ember CLI "as Administrator" increases performance significantly.
         [exec] See ember-cli.com/user-guide/#windows for details.
         [exec] 
         [exec] cleaning up...
         [exec] Build failed.
         [exec] File: assets/vendor.css
         [exec] The Broccoli Plugin: [broccoli-persistent-filter:CleanCSSFilter] failed with:
         [exec] Error: 3 errors found while optimizing CSS with clean-css:
         [exec]   1. Ignoring local source map at "D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\tmp\broccoli_persistent_filterclean_cssfilter-input_base_path-daTKhwFh.tmp\assets\bootstrap.min.css.map" as resource is missing.
         [exec]   2. Ignoring local source map at "D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\tmp\broccoli_persistent_filterclean_cssfilter-input_base_path-daTKhwFh.tmp\assets\bootstrap-theme.min.css.map" as resource is missing.
         [exec]   3. Ignoring local source map at "D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\tmp\broccoli_persistent_filterclean_cssfilter-input_base_path-daTKhwFh.tmp\assets\bootstrap.css.map" as resource is missing.
         [exec] 
         [exec] clean-css dangerously ignores these errors but broccoli-clean-css doesn't, because it's much more reasonable to update the CSS to fix all problems than to pretend that you didn't see the errors.
         [exec]     at minify (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\clean-css-promise\index.js:63:18)
         [exec]     at D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\clean-css\lib\clean.js:107:9
         [exec]     at Object.callback (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\clean-css\lib\reader\read-sources.js:29:9)
         [exec]     at doApplySourceMaps (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\clean-css\lib\reader\apply-source-maps.js:61:23)
         [exec]     at D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\clean-css\lib\reader\apply-source-maps.js:86:12
         [exec]     at extractInputSourceMapFrom (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\clean-css\lib\reader\apply-source-maps.js:122:14)
         [exec]     at fetchAndApplySourceMap (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\clean-css\lib\reader\apply-source-maps.js:79:10)
         [exec]     at doApplySourceMaps (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\clean-css\lib\reader\apply-source-maps.js:57:14)
         [exec]     at D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\clean-css\lib\reader\apply-source-maps.js:86:12
         [exec]     at extractInputSourceMapFrom (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\clean-css\lib\reader\apply-source-maps.js:122:14)
         [exec] 
         [exec] The broccoli plugin was instantiated at: 
         [exec]     at CleanCSSFilter.Plugin (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\broccoli-plugin\index.js:7:31)
         [exec]     at CleanCSSFilter.Filter [as constructor] (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\broccoli-persistent-filter\index.js:62:10)
         [exec]     at CleanCSSFilter (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\broccoli-clean-css\index.js:29:5)
         [exec]     at module.exports.preprocessMinifyCss (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\ember-cli-preprocess-registry\preprocessors.js:112:12)
         [exec]     at EmberApp.styles (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\ember-cli\lib\broccoli\ember-app.js:1377:23)
         [exec]     at EmberApp.toArray (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\ember-cli\lib\broccoli\ember-app.js:1675:10)
         [exec]     at EmberApp.toTree (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\ember-cli\lib\broccoli\ember-app.js:1696:30)
         [exec]     at module.exports (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\ember-cli-build.js:26:14)
         [exec]     at CoreObject.setupBroccoliBuilder (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\ember-cli\lib\models\builder.js:84:19)
         [exec]     at CoreObject.init (D:\sigdev\IntegrateCareManagement\CMTEmberUI\cmt\node_modules\ember-cli\lib\models\builder.js:64:10)
         [exec] 
         [exec] 
         [echo] *** EMBER COMMAND RESULTS ***
         [echo] 1
         [exec] Result: 1
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 22:30.494s
    [INFO] Finished at: Fri Feb 24 01:47:06 IST 2017
    [INFO] Final Memory: 11M/143M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (ember-cli) on project CMTEmberUI: An Ant BuildException has occured: unless=cmdsuccess
    [ERROR] around Ant part ...<fail unless="cmdsuccess"/>... @ 42:30 in D:\sigdev\IntegrateCareManagement\CMTEmberUI\target\antrun\build-building.xml
    [ERROR] -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

    Process finished with exit code 1

我是 ember 的新手,无法找到此错误背后的原因。 Ember 无法生成 CSS 文件。

我尝试通过 bower 安装手动添加 ember-cli-shims 和 Bootstrap ,但问题仍然没有得到解决。

最佳答案

在 ember-cli-preprocessor-registry 3.1.0 ( details ) 中有一些回归。 3.1.1 已经出来了,现在一切正常。您可能需要删除 node_modules 目录并运行 npm install 以更新依赖项。

关于css - Ember 构建时在 tmp 文件夹中找不到 Bootstrap css 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42425540/

相关文章:

html - 如何使 CSS 背景响应特定尺寸

javascript - 如何在表单元素中将按钮标记为事件 onclick

php - 每次循环运行时更改类

javascript - Ember.js 动态模型

jquery - 如何使用时间触发器更改事件选项卡颜色。 PHP?

html - 无法更改 Bootstrap-select selectpicker 的标题

javascript - Bootstrap 日期时间选择器日历未打开 Angular 2

html - 左边是 Bootstrap 轮播,右边是动态文本

javascript - 将 ember 2.8 升级到 2.11 的问题 - 找不到模块 'ember'

javascript - 在 Ember.js 中声明 mixin 时,将应用程序命名空间作为第一个参数是什么意思?