安装完成后重新安装Ember CLI崩溃 – 我在做什么错?

我不知道什么是错的,但是当我更改我的项目中的文件,这将触发一个重build,我得到一个EEXIST, file already exists错误与tmp文件位置的引用。

为了说明请看下面的内容:

1)我按照Ember发布的说明从一个干净的版本开始 :

 ➜ code npm uninstall -g ember-cli unbuild ember-cli@0.2.0-beta.1 ➜ code npm cache clean ➜ code bower cache clean bower deleted Cached package ember: /Users/userx/.cache/bower/packages/6c52274ebac940c836cec79e11a2d66a/1.10.0 bower deleted Cached package ember-cli-test-loader: /Users/userx/.cache/bower/packages/fe70ed35683979c3b9a86502abc892c8/0.1.3 bower deleted Cached package ember-load-initializers: /Users/userx/.cache/bower/packages/ace05fe526bc815d00157b3e7fdcccab/0.0.2 bower deleted Cached package ember-qunit: /Users/userx/.cache/bower/packages/6b2637f1e3c33e331968889fd7088678/0.2.8 bower deleted Cached package ember-qunit-notifications: /Users/userx/.cache/bower/packages/ebaf09c3e2e50cee4fa08625051f7d60/0.0.7 bower deleted Cached package ember-data: /Users/userx/.cache/bower/packages/b56c7ee7b1cb5f358555b733f3ec15c1/1.0.0-beta.15 bower deleted Cached package ember-cli-shims: /Users/userx/.cache/bower/packages/b2aa621bf259c52274bc62a524406e11/0.0.3 bower deleted Cached package loader.js: /Users/userx/.cache/bower/packages/b765bce6e48383520b38bc3732776d8e/1.0.1 bower deleted Cached package qunit-notifications: /Users/userx/.cache/bower/packages/cb84eb840aaebd3c38265d13fc3e2e70/0.0.6 bower deleted Cached package ember-resolver: /Users/userx/.cache/bower/packages/93ca6e97b9b9d8c72c8101fc00862583/0.1.12 bower deleted Cached package qunit: /Users/userx/.cache/bower/packages/db7350f12693d26675a7426499405707/1.17.1 bower deleted Cached package jquery: /Users/userx/.cache/bower/packages/fe2fe255e91d251051d543998aa8327a/1.11.2 bower deleted Cached package jquery: /Users/userx/.cache/bower/packages/fe2fe255e91d251051d543998aa8327a/2.1.3 

2)安装Ember CLI 0.2.0-beta.1

 ➜ code npm install -g ember-cli@0.2.0-beta.1 /usr/local/bin/ember -> /usr/local/lib/node_modules/ember-cli/bin/ember ember-cli@0.2.0-beta.1 /usr/local/lib/node_modules/ember-cli ├── abbrev@1.0.5 ├── ember-cli-copy-dereference@1.0.0 ├── js-string-escape@1.0.0 ├── exit@0.1.2 ├── debug@2.1.2 (ms@0.7.0) ├── temp@0.8.1 (rimraf@2.2.8) ├── symlink-or-copy@1.0.1 (copy-dereference@1.0.0) ├── http-proxy@1.8.1 (requires-port@0.0.0, eventemitter3@0.1.6) ├── promise-map-series@0.2.1 (rsvp@3.0.17) ├── yam@0.0.17 (fs-extra@0.8.1, findup@0.1.5, lodash@2.4.1) ├── broccoli-writer@0.1.1 (rsvp@3.0.17, quick-temp@0.1.2) ├── broccoli-sane-watcher@0.1.1 (broccoli-slow-trees@1.0.0, rsvp@3.0.17, sane@1.0.0-rc1) ├── broccoli-caching-writer@0.5.1 (rsvp@3.0.17, quick-temp@0.1.2, broccoli-kitchen-sink-helpers@0.2.6, core-object@0.0.2, rimraf@2.3.0) ├── broccoli-sourcemap-concat@0.4.3 (combined-stream@0.0.7, mkdirp@0.5.0, rsvp@3.0.17, broccoli-kitchen-sink-helpers@0.2.6, lodash-node@2.4.1, fast-sourcemap-concat@0.2.2, broccoli-caching-writer@0.5.3) └── broccoli-es6modules@0.5.1 (walk-sync@0.1.3, mkdirp@0.5.0, rsvp@3.0.17, broccoli-kitchen-sink-helpers@0.2.6, broccoli-caching-writer@0.5.3, esperanto@0.6.17) 

3)certificate自己Ember / node / npm都很好

 ➜ code ember version version: 0.2.0-beta.1 node: 0.12.0 npm: 2.1.8 

4)创build一个全新的Ember应用程序

 ➜ code ember new an-app version: 0.2.0-beta.1 installing create .bowerrc create .editorconfig create .ember-cli create .jshintrc create .travis.yml create Brocfile.js create README.md create app/app.js create app/components/.gitkeep create app/controllers/.gitkeep create app/helpers/.gitkeep create app/index.html create app/models/.gitkeep create app/router.js create app/routes/.gitkeep create app/styles/app.css create app/templates/application.hbs create app/templates/components/.gitkeep create app/views/.gitkeep create bower.json create config/environment.js create .gitignore create package.json create public/crossdomain.xml create public/robots.txt create testem.json create tests/.jshintrc create tests/helpers/resolver.js create tests/helpers/start-app.js create tests/index.html create tests/test-helper.js create tests/unit/.gitkeep create vendor/.gitkeep Installed packages for tooling via npm. Installed browser packages via Bower. Successfully initialized git. 

5)启动应用程序

 ➜ code cd an-app ➜ an-app git:(master) ember server version: 0.2.0-beta.1 Livereload server on port 35729 Serving on http://0.0.0.0:4200/ Build successful - 3682ms. Slowest Trees | Total -------------------------------+---------------- Concat: Vendor | 3046ms 

6)保存一个未修改的router.js ,这将触发重build。 这是事情崩溃的地方。

 file changed router.js EEXIST, file already exists '/Users/userx/code/an-app/tmp/caching-writer-dest-dir_4SJKQT.tmp' Error: EEXIST, file already exists '/Users/userx/code/an-app/tmp/caching-writer-dest-dir_4SJKQT.tmp' at Error (native) at Object.fs.symlinkSync (fs.js:852:18) at symlink (/Users/userx/code/an-app/node_modules/ember-cli/node_modules/symlink-or-copy/index.js:82:14) at Function.symlinkOrCopySync (/Users/userx/code/an-app/node_modules/ember-cli/node_modules/symlink-or-copy/index.js:58:5) at /Users/userx/code/an-app/node_modules/ember-cli/node_modules/broccoli-sourcemap-concat/node_modules/broccoli-caching-writer/index.js:103:21 at lib$rsvp$$internal$$tryCatch (/Users/userx/code/an-app/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:489:16) at lib$rsvp$$internal$$invokeCallback (/Users/userx/code/an-app/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:501:17) at lib$rsvp$$internal$$publish (/Users/userx/code/an-app/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:472:11) at lib$rsvp$asap$$flush (/Users/userx/code/an-app/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:1290:9) at process._tickCallback (node.js:355:11) 

我真的不知道如何/从哪里开始debugging。 我已经尝试了以前版本的节点,io.js和删除/重新安装watcher 。 都失败了。

感谢您的时间。

    Ember CLI社区在一夜之间发现了这个问题的一个修复。 您可以通过以下链接查看讨论: https : //github.com/ember-cli/ember-cli/issues/3413

    它的长短:修改你的package.json文件在devDependencies下包含"rimraf":"2.2.8" "broccoli-sass": "^0.4.0" ,在列出的依赖关系下包含"rimraf":"2.2.8"

    我可以确认,如果你做了这些改变,然后删除/node_modules/bower_components/tmp ,然后执行npm installbower install ,然后运行ember server ,当文件改变时你的项目会自动更新。

    只是不要问我为什么。