ember-cli-update: Error: dest already exists.

HEAD is now at fb844d2 2.17.0
Previous HEAD position was fb844d2 2.17.0
HEAD is now at 1bcb7a1 2.18.2
Previous HEAD position was 1bcb7a1 2.18.2
HEAD is now at fb844d2 2.17.0
Switched to a new branch 'c0807740-f491-11e8-b21e-cfbf6a666c9f'
Switched to branch 'upgrade-ember-cli-v2'
error: could not apply 312f897... message
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
Error: dest already exists.
    at pathExists (/Users/samselikoff/.npm/_npx/48212/lib/node_modules/ember-cli-update/node_modules/fs-extra/lib/move/index.js:46:31)
    at fn.apply.then.r (/Users/samselikoff/.npm/_npx/48212/lib/node_modules/ember-cli-update/node_modules/universalify/index.js:23:46)
    at <anonymous>

Can anyone help me reproduce?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 5
  • Comments: 31 (12 by maintainers)

Most upvoted comments

OK I finally reproduced. @czosel Thank you!

Thanks to @czosel, should be fixed in v0.31.5.

@kellyselden I managed to get it working last night on one project, by commenting out my entire .gitignore_global file

If it’s any use, the contents are:

/vendor
/node_modules
/bower_components
.sass-cache
.idea/*
.vagrant/*
_ide_helper.php
.phpstorm.meta.php
.DS_Store
nohup.out

Reopening, but I don’t know what the problem is. I’m trying to reproduce with tmp/ stuff.

@kellyselden This still seems to be an issue for me running 0.32.2 (also tried with 0.31.5)

Any idea what I might have missed? Or would you prefer I logged it as a new ticket?

Cloning into bare repository '/tmp/tmp-9653cqy24yJcWiAn/.git'...
Note: checking out 'beba5c1ef114dee100f26bfcba548598396fdbb9'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at beba5c1 3.1.2
Previous HEAD position was beba5c1 3.1.2
HEAD is now at 6742bfc 3.8.1
Previous HEAD position was 6742bfc 3.8.1
HEAD is now at beba5c1 3.1.2
Switched to a new branch '4238e7b0-4c24-11e9-941c-5166454b1874'
Switched to branch 'master'
(node:9653) UnhandledPromiseRejectionWarning: Error: dest already exists.
    at pathExists (/home/mou/.nvm/versions/node/v8.11.4/lib/node_modules/ember-cli-update/node_modules/fs-extra/lib/move/index.js:46:31)
    at fn.apply.then.r (/home/mou/.nvm/versions/node/v8.11.4/lib/node_modules/ember-cli-update/node_modules/universalify/index.js:23:46)
    at <anonymous>
(node:9653) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9653) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:9653) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
(node:9653) UnhandledPromiseRejectionWarning: Error: dest already exists.
    at pathExists (/home/mou/.nvm/versions/node/v8.11.4/lib/node_modules/ember-cli-update/node_modules/fs-extra/lib/move/index.js:46:31)
    at fn.apply.then.r (/home/mou/.nvm/versions/node/v8.11.4/lib/node_modules/ember-cli-update/node_modules/universalify/index.js:23:46)
    at <anonymous>
(node:9653) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

Nice work!

I’m still finding it impossible to recreate. Trying to repro @gmkohler’s case gives me:

ember-cli-update --from 3.0.4 --to 3.1
Cloning into bare repository '/var/folders/6v/2mdd4ts56x1ct5r8fv086rmh0000gn/T/tmp-35525pLb30lBO6Xi5/.git'...
Note: checking out '17e54c50330ee02236fc4b19d86ce35b0fefedd2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 17e54c5 3.0.4
Previous HEAD position was 17e54c5 3.0.4
HEAD is now at 95ae3bf 3.1.4
Previous HEAD position was 95ae3bf 3.1.4
HEAD is now at 17e54c5 3.0.4
Switched to a new branch '02f0e460-40c4-11e9-aafd-dfe8e2b3a6ff'
Switched to branch 'gmkohler/ember-3.1'
error: could not apply a14942e... message
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'

using your versions and branch name. I’m still at a loss… Can anyone here clone this repo and try to run the test suite? Maybe that will uncover something?

@kellyselden Yeah I had more code added to the .gitignore, index.js, and readme.md, that I had added before. They were getting changed and there was a merge conflict because the update wanted to put them in their default state. I would try to resolve conflicts picking my changes where appropriate and then tried to run the update again and resulting in having a merge conflict on those files again. So I decided to just copy the files somewhere else, try the update, pick all of the changes to make those files back to the default output, run the update again (which worked this time), and then put my code back in those files.

Hopefully this makes sense? Let me know if you have more questions.