2016-03-09 86 views
0

我升級了embercli,emberjs和ember數據。我運行ember init後。然後當我ember server,我得到了下面的東西。我試圖重做一切(升級)。同樣的結果。沒有錯誤。升級embercli時只有幾個警告。我在最後附加了警告。我不確定它們是否相關。未能在升級後啓動Ember,未找到es5-shim.js

[[email protected] hillwave-ember-js]$ ember serve 
version: 2.4.2 
Could not start watchman; falling back to NodeWatcher for file system events. 
Visit http://www.ember-cli.com/user-guide/#watchman for more info. 
Livereload server on http://localhost:49152 
Serving on http://localhost:4200/ 
The Broccoli Plugin: [SourceMapConcat: Concat: Vendor /assets/vendor.js] failed with: 
Error: ENOENT: no such file or directory, stat '/home/jusfeel/ember/hillwave-ember-js/tmp/source_map_concat-input_base_path-CxIUyeSW.tmp/0/bower_components/es5-shim/es5-shim.js' 
    at Error (native) 
    at Object.fs.statSync (fs.js:893:18) 
    at ConcatWithMaps.keyForFile (/home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-caching-writer/index.js:90:20) 
    at Array.map (native) 
    at ConcatWithMaps.CachingWriter._conditionalBuild (/home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-caching-writer/index.js:112:65) 
    at /home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-caching-writer/node_modules/broccoli-plugin/read_compat.js:61:34 
    at lib$rsvp$$internal$$tryCatch (/home/jusfeel/ember/hillwave-ember-js/node_modules/rsvp/dist/rsvp.js:1036:16) 
    at lib$rsvp$$internal$$invokeCallback (/home/jusfeel/ember/hillwave-ember-js/node_modules/rsvp/dist/rsvp.js:1048:17) 
    at lib$rsvp$$internal$$publish (/home/jusfeel/ember/hillwave-ember-js/node_modules/rsvp/dist/rsvp.js:1019:11) 
    at lib$rsvp$asap$$flush (/home/jusfeel/ember/hillwave-ember-js/node_modules/rsvp/dist/rsvp.js:1198:9) 

The broccoli plugin was instantiated at: 
    at ConcatWithMaps.Plugin (/home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-caching-writer/node_modules/broccoli-plugin/index.js:10:31) 
    at ConcatWithMaps.CachingWriter [as constructor] (/home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-caching-writer/index.js:21:10) 
    at new ConcatWithMaps (/home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-concat/concat.js:22:17) 
    at module.exports (/home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-concat/index.js:26:10) 
    at EmberApp.concatFiles (/home/jusfeel/ember/hillwave-ember-js/node_modules/ember-cli/lib/broccoli/ember-app.js:329:10) 
    at EmberApp.javascript (/home/jusfeel/ember/hillwave-ember-js/node_modules/ember-cli/lib/broccoli/ember-app.js:1190:12) 
    at EmberApp.toArray (/home/jusfeel/ember/hillwave-ember-js/node_modules/ember-cli/lib/broccoli/ember-app.js:1542:10) 
    at EmberApp.toTree (/home/jusfeel/ember/hillwave-ember-js/node_modules/ember-cli/lib/broccoli/ember-app.js:1564:30) 
    at module.exports (/home/jusfeel/ember/hillwave-ember-js/ember-cli-build.js:38:14) 
    at Class.module.exports.Task.extend.setupBroccoliBuilder (/home/jusfeel/ember/hillwave-ember-js/node_modules/ember-cli/lib/models/builder.js:55:19) 

我bower.json

{ 
    "name": "hillwave-ember-js", 
    "dependencies": { 
    "ember": "2.4.2", 
    "ember-cli-shims": "0.1.0", 
    "ember-cli-test-loader": "0.2.2", 
    "jquery": "~2.1.0", 
    "bootstrap": "~3.3.6", 
    "showdown": "~1.3.0", 
    "fastclick": "^1.0.6" 
    }, 
    "resolutions": { 
    "ember": "2.3.1" 
    }, 
    "devDependencies": { 
    "blanket": "~1.1.5", 
    "ember-qunit-notifications": "0.1.0" 
    } 
} 

我的package.json

{ 
    "name": "hillwave-ember-js", 
    "version": "0.0.0", 
    "description": "Small description for hillwave-ember-js goes here", 
    "private": true, 
    "directories": { 
    "doc": "doc", 
    "test": "tests" 
    }, 
    "scripts": { 
    "build": "ember build", 
    "start": "ember server", 
    "test": "ember test" 
    }, 
    "repository": "", 
    "engines": { 
    "node": ">= 0.10.0" 
    }, 
    "author": "", 
    "license": "MIT", 
    "devDependencies": { 
    "broccoli-asset-rev": "^2.2.0", 
    "ember-ajax": "0.7.1", 
    "ember-cli": "^2.4.2", 
    "ember-cli-app-version": "^1.0.0", 
    "ember-cli-babel": "^5.1.5", 
    "ember-cli-blanket": "0.8.0", 
    "ember-cli-dependency-checker": "^1.2.0", 
    "ember-cli-deploy": "0.5.1", 
    "ember-cli-deploy-build": "0.1.1", 
    "ember-cli-deploy-display-revisions": "0.1.1", 
    "ember-cli-deploy-revision-data": "0.1.1", 
    "ember-cli-deploy-rsync": "0.0.4", 
    "ember-cli-deploy-ssh-index": "0.2.0", 
    "ember-cli-document-title": "0.3.0", 
    "ember-cli-es5-shim": "^0.1.1", 
    "ember-cli-fastclick": "1.1.0", 
    "ember-cli-flash": "1.3.8", 
    "ember-cli-htmlbars": "^1.0.1", 
    "ember-cli-htmlbars-inline-precompile": "^0.3.1", 
    "ember-cli-inject-live-reload": "^1.3.1", 
    "ember-cli-qunit": "^1.2.1", 
    "ember-cli-release": "0.2.8", 
    "ember-cli-showdown": "2.5.0", 
    "ember-cli-sri": "^2.1.0", 
    "ember-cli-uglify": "^1.2.0", 
    "ember-data": "^2.4.0", 
    "ember-disable-proxy-controllers": "^1.0.1", 
    "ember-export-application-global": "^1.0.4", 
    "ember-i18n": "4.2.0", 
    "ember-infinity": "0.2.1", 
    "ember-lazy-image": "https://github.com/twokul/ember-lazy-image.git", 
    "ember-load-initializers": "^0.5.0", 
    "ember-page-object": "1.1.1", 
    "ember-resolver": "^2.0.3", 
    "ember-route-history": "0.1.3", 
    "ember-simple-auth": "1.0.1", 
    "ember-suave": "1.2.3", 
    "emberx-select": "2.0.2", 
    "fastclick": "1.0.6", 
    "graceful-fs": "^4.1.3", 
    "memory-scroll": "0.2.0" 
    }, 
    "dependencies": { 
    "fonts.css": "^1.4.0", 
    "loader.js": "^4.0.0" 
    } 
} 

一些警告,當升級embercli從2.2.0到2.4.2。

npm WARN deprecated [email protected]: This package has been discontinued in favor of [email protected]^4.0.0. 
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to [email protected]^4.0.0 as soon as possible. 
npm WARN prefer global [email protected] should be installed with -g 
npm WARN prefer global [email protected] should be installed with -g 

編輯

/*jshint node:true*/ 
/* global require, module */ 
var EmberApp = require('ember-cli/lib/broccoli/ember-app'); 

module.exports = function(defaults) { 
    var app = new EmberApp(defaults, { 
    // Add options here 
    minifyCSS: { 
     enabled: true, 
     compatibility: '-properties.backgroundSizeMerging' 
    } 
    }); 

    // Use `app.import` to add additional libraries to the generated 
    // output files. 
    // 
    // If you need to use different assets in different 
    // environments, specify an object as the first parameter. That 
    // object's keys should be the environment name and the values 
    // should be the asset to use in that environment. 
    // 
    // If the library that you are including contains AMD or ES6 
    // modules that you would like to import into your application 
    // please specify an object with the list of modules as keys 
    // along with the exports of each module as its value. 

    app.import('bower_components/bootstrap/dist/css/bootstrap.css'); 
    app.import('bower_components/bootstrap/dist/css/bootstrap.css.map',{ 
    destDir: 'assets' 
    }); 
    app.import('vendor/royal_preloader/royal_preloader.css'); 

    app.import('bower_components/bootstrap/dist/js/bootstrap.js'); 
    app.import('vendor/royal_preloader/royal_preloader.min.js'); 
    app.import('vendor/jquery.qrcode.min.js'); 
    app.import('vendor/royal_preloader/config.js'); 

    return app.toTree(); 
}; 
+0

看看[這裏](https://github.com/ember-cli/ember-cli/issues/2635) – Shayan

+0

謝謝。我犯了一個錯誤。該墊片應該消失,但不知何故,我在手冊「init」中保存它。 – Hao

回答

0

這是我犯了一個錯誤。當我做ember init時,我沒有注意從package.json中刪除es5-shim並將它留在那裏。這就是爲什麼這個問題引起我的注意

我想我應該更加小心,當我做ember initrelease doc實際上已經警告。

升級疼痛的最常見原因是此 步驟中缺少更改。

相關問題