Ember build

时间:2017-02-23 20:27:08

标签: css twitter-bootstrap ember.js

在ember构建时,app / styles目录中不会生成CSS文件。下面给出了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 install手动添加ember-cli-shims和bootstrap,但问题仍未得到解决。

2 个答案:

答案 0 :(得分:0)

ember-cli-preprocessor-registry 3.1.0(details)中有一些回归。 3.1.1已经出来了,一切都应该正常工作。您可能需要删除npm install目录并运行import sched, time def pri(): print "A" s= sched.scheduler(time.time, time.sleep) s.enter(60, 1, pri, ()) s.run print "Hello" 以更新依赖项。

答案 1 :(得分:0)

我试过了,发现生成的cmt css文件(dist / assets / cmt.css)是0字节。

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] [WARN] (broccoli-uglify-sourcemap) Minifying: `assets/vendor.js` took: 45296ms (more than 20,000ms)
     [exec] cleaning up...
     [exec] Built project successfully. Stored in "dist/".
     [exec] File sizes:
     [exec]  - dist/assets/cmt.css: 0 B
     [exec]  - dist/assets/cmt.js: 98.14 KB (11.83 KB gzipped)
     [exec]  - dist/assets/vendor.css: 170.32 KB (29.94 KB gzipped)
     [exec]  - dist/assets/vendor.js: 1.11 MB (289.25 KB gzipped)
     [echo] *** EMBER COMMAND RESULTS ***
     [echo] 0