2017-09-15 54 views
1

我試圖阻止我的灰燼項目中使用亭子依賴。我將ember-cli更新爲2.15.1,並將bower依賴關係移至package.json。也許這將是有益的知道哪些依賴關係:移動從亭子走在2.15.1燼,CLI版本

"font-awesome": "~4.7.0", 
"jquery.inputmask": " 
"moment": "~2.18.1", 
"moment-timezone": "0.5.13" 

我們還使用自舉日期選擇器作爲一個涼亭依賴,但由於該錯誤消息我換它的餘燼,自舉的DateTimePicker希望能解決我的問題。我重新安裝了node_modules,除去bower_components,清除TMP和dist文件夾並運行NPM緩存清理& &涼亭緩存清理。從該項目中,我刪除了bower.json和.bowerrc。我也在package.json中明確定義了bowerDirectory:null,以便在ember-cli-build.js中,broccoli不會尋找任何bower組件。

在我燼-CLI-build.js:

const isProductionLikeBuild = ['production', 'staging', 'review', 'e2e-testing'].indexOf(env) > -1; 
const app = new EmberApp(defaults, { 
    fingerprint: { 
     enabled: isProductionLikeBuild, 
     prepend: envConf.assetsPrefix 
    }, 
    sourcemaps: { 
     enabled: !isProductionLikeBuild 
    }, 
    minifyCSS: { enabled: isProductionLikeBuild }, 
    minifyJS: { enabled: isProductionLikeBuild }, 
    'ember-cli-babel': { 
     includePolyfill: true 
    }, 
    'ember-bootstrap-datetimepicker': { 
     "importBootstrapCSS": true, 
     "importBootstrapJS": true, 
     "importBootstrapTheme": true 
    }, 
    'ember-font-awesome': { fontsOutput: '/assets/fonts' }, 
    exportConfig: { 
     environments: [ 
     'production', 
     'staging', 
     'review', 
     'e2e-testing' 
     ] 
    } 
    }); 

當我關掉sourcemaps,應用正確的建築。 當我不但是,這是我打字燼年代後得到:

The Broccoli Plugin: [BroccoliMergeTrees: TreeMerger (vendor & appJS)] failed with: 
Error: ENOENT: no such file or directory, open '/Users/martagajowczyk/Desktop/Project/project-frontend/tmp/source_map_concat-input_base_path-S2ZmmRR0.tmp/bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.js' 
    at Error (native) 
    at Object.fs.openSync (fs.js:641:18) 
    at Object.fs.readFileSync (fs.js:509:33) 
    at SourceMap.addFile (/Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/fast-sourcemap-concat/lib/source-map.js:75:31) 
    at /Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/broccoli-concat/concat.js:200:16 
    at Array.forEach (native) 
    at Concat.<anonymous> (/Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/broccoli-concat/concat.js:198:24) 
    at /Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/fast-sourcemap-concat/lib/source-map.js:419:12 
    at initializePromise (/Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/rsvp/dist/rsvp.js:567:5) 
    at new Promise (/Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/rsvp/dist/rsvp.js:1039:33) 

The broccoli plugin was instantiated at: 
    at BroccoliMergeTrees.Plugin (/Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/broccoli-plugin/index.js:7:31) 
    at new BroccoliMergeTrees (/Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:16:10) 
    at Function.BroccoliMergeTrees [as _upstreamMergeTrees] (/Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:10:53) 
    at mergeTrees (/Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/ember-cli/lib/broccoli/merge-trees.js:85:33) 
    at EmberApp._mergeTrees (/Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/ember-cli/lib/broccoli/ember-app.js:1832:12) 
    at EmberApp.javascript (/Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/ember-cli/lib/broccoli/ember-app.js:1307:17) 
    at EmberApp.toArray (/Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/ember-cli/lib/broccoli/ember-app.js:1689:12) 
    at EmberApp.toTree (/Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/ember-cli/lib/broccoli/ember-app.js:1711:38) 
    at module.exports (/Users/martagajowczyk/Desktop/Project/project-frontend/ember-cli-build.js:46:14) 
    at Builder.setupBroccoliBuilder (/Users/martagajowczyk/Desktop/Project/project-frontend/node_modules/ember-cli/lib/models/builder.js:56:19) 

什麼可以鏈接到bower_components的原因是什麼? 由於從灰燼版本

輸出--verbose & & NPM --version & &紗--version:

ember-cli: 2.15.1 
http_parser: 2.7.0 
node: 6.10.3 
v8: 5.1.281.101 
uv: 1.9.1 
zlib: 1.2.11 
ares: 1.10.1-DEV 
icu: 58.2 
modules: 48 
openssl: 1.0.2k 
os: darwin x64 
3.10.10 
0.24.6 

下面是我列出的用的package.json依賴性和DEV-依賴關係的一部分:

"devDependencies": { 
    "broccoli-asset-rev": "^2.5.0", 
    "ember-ajax": "^3.0.0", 
    "ember-bootstrap-datetimepicker": "^1.1.0", 
    "ember-buffered-proxy": "^0.7.0", 
    "ember-can": "^0.8.4", 
    "ember-cli": "^2.15.1", 
    "ember-cli-app-version": "^3.0.0", 
    "ember-cli-autoprefixer": "0.8.0", 
    "ember-cli-babel": "^6.8.2", 
    "ember-cli-bootstrap-datepicker": "^0.5.6", 
    "ember-cli-code-coverage": "^0.4.1", 
    "ember-cli-content-security-policy": "1.0.0", 
    "ember-cli-dependency-checker": "^2.0.1", 
    "ember-cli-eslint": "^4.2.0", 
    "ember-cli-htmlbars": "^2.0.3", 
    "ember-cli-htmlbars-inline-precompile": "^1.0.2", 
    "ember-cli-inject-live-reload": "^1.6.1", 
    "ember-cli-mirage": "^0.3.1", 
    "ember-cli-moment-shim": "^3.5.0", 
    "ember-cli-page-object": "1.11.0", 
    "ember-cli-polyfill-io": "^1.2.2", 
    "ember-cli-qunit": "^4.0.0", 
    "ember-cli-sass": "^7.0.0", 
    "ember-cli-shims": "^1.1.0", 
    "ember-cli-sri": "^2.1.1", 
    "ember-cli-uglify": "^1.2.0", 
    "ember-cli-yuidoc": "0.8.8", 
    "ember-cp-validations": "^3.3.0", 
    "ember-data": "^2.13.1", 
    "ember-deep-set": "^0.1.2", 
    "ember-exex": "^0.1.12", 
    "ember-export-application-global": "^2.0.0", 
    "ember-feature-flags": "3.0.0", 
    "ember-font-awesome": "4.0.0-alpha.3", 
    "ember-inflector": "^2.0.0", 
    "ember-inputmask": "0.4.0-beta.5", 
    "ember-intercom-io": "^0.1.3", 
    "ember-intl": "^2.23.1", 
    "ember-intl-cp-validations": "^3.0.1", 
    "ember-load-initializers": "^1.0.0", 
    "ember-math-helpers": "^2.0.5", 
    "ember-modal-dialog": "^2.3.0", 
    "ember-moment": "7.4.1", 
    "ember-multiselect-checkboxes": "^0.10.3", 
    "ember-power-select": "^1.8.2", 
    "ember-promise-helpers": "^1.0.3", 
    "ember-radio-button": "1.1.1", 
    "ember-resolver": "^4.1.0", 
    "ember-responsive": "2.0.4", 
    "ember-rl-dropdown": "^0.10.1", 
    "ember-route-action-helper": "^2.0.3", 
    "ember-simple-auth": "1.4.0", 
    "ember-sinon": "1.0.1", 
    "ember-sinon-qunit": "2.0.0", 
    "ember-sliding-sticky": "^1.0.0", 
    "ember-source": "^2.13.0", 
    "ember-svg-jar": "^0.11.1", 
    "ember-test-selectors": "0.3.7", 
    "ember-truth-helpers": "1.3.0", 
    "ember-uploader": "^1.2.2", 
    "ember-watson": "^0.9.1", 
    "eonasdan-bootstrap-datetimepicker": "~4.17.42", 
    "loader.js": "^4.4.0", 
    "modal-dialog": "1.6.3", 
    "yuidoc-ember-theme": "^1.3.0" 
    }, 
    "dependencies": { 
    "bootstrap-sass": "^3.3.7", 
    "broccoli-funnel": "^2.0.1", 
    "font-awesome": "~4.7.0", 
    "jquery.inputmask": "3.3.4", 
    "moment": "~2.18.1", 
    "moment-timezone": "0.5.13" 
    } 
+0

你能告訴你的全'package.json'?我強烈地認爲這與您使用需要涼亭的餘燼插件有關。 'ember-bootstrap-datetimepicker'看起來沒有維護,這可能是你的問題。也許你應該檢查燼鬆弛幫助頻道。通常人們能夠以更互動的方式提供幫助。請隨時ping我。 – Lux

+0

@Lux我添加了我的文章以包含'package.json'。 –

回答