Yarn: Yarn Upgrade fails when cache isn't clean

Created on 5 Jan 2017  路  2Comments  路  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Not fetching any packages

If the current behavior is a bug, please provide the steps to reproduce.
I'm using a package from git, I'm not sure if this is what actually makes this bug happen, but, it appears in console log.

{
  ...
  "devDependencies": {
    "gulp": "git+https://github.com/gulpjs/gulp.git#4.0",
  }
  ...
}

What is the expected behavior?
Fetch packages

Please mention your node.js, yarn and operating system version.

  • node v7.3.0
  • yarn 0.18.1
  • Windows Server 2016 Standard

installed with choco

Error when executing comand from Windows service account

Log of yarn upgrade

yarn upgrade v0.18.1
[1/5] Resolving packages...
info Visit https://yarnpkg.com/en/docs/cli/upgrade for documentation about this command.
error Command failed.
Exit code: 128
Command: git
Arguments: clone https://github.com/gulpjs/gulp.git C:\Windows\system32\config\systemprofile\AppData\Local\Yarn\cache\.tmp\513be8c6898f096cd709c414b0ea897d
Directory: C:\TeamCity\buildAgent1\work\dc9dbbca4571b448
Output:
fatal: destination path 'C:\Windows\system32\config\systemprofile\AppData\Local\Yarn\cache\.tmp\513be8c6898f096cd709c414b0ea897d' already exists and is not an empty directory.
Process exited with code 1

PS: with yarn install happens the same error

Most helpful comment

yarn cache clean before yarn install or yarn upgrade does not work

All 2 comments

yarn cache clean before yarn install or yarn upgrade does not work

I also experienced this issue.

This workaround was successful for me:
yarn install --cache-folder ./yarn-cache

See also: yarn cache

Was this page helpful?
0 / 5 - 0 ratings