Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest cache file use not allowed characters in windows #6306

Closed
tobwiens opened this issue May 27, 2018 · 2 comments 路 Fixed by #8353
Closed

Jest cache file use not allowed characters in windows #6306

tobwiens opened this issue May 27, 2018 · 2 comments 路 Fixed by #8353

Comments

@tobwiens
Copy link

馃悰 Bug Report

Having meteor edgee:slingshot breaks tests on Windows (even tests which are not related to edgee:slingshot). Because cache files contain following pattern edgee:slingshot.

I run with jest --runInBand --no-cache and with a filename limit longer than 260 characters on Windows; to exclude most common issues.

Note: I also use "jest-meteor-stubs": "^1.5.1",.

I get following error:

jest: failed to cache transform results in: C:/Users/Toby/AppData/Local/Temp/jest/jest-transform-cache-3b355e43267006a961f775eebe35ec8b-23cb965d9de5fb025f1c47abdd17736c/52/edgee:slingshot_5227fcb291f4ad4f1bd2925a381ec5c7
    Failure message: EINVAL: invalid argument, rename 'C:\Users\Toby\AppData\Local\Temp\jest\jest-transform-cache-3b355e43267006a961f775eebe35ec8b-23cb965d9de5fb025f1c47abdd17736c\52\edgee:slingshot_5227fcb291f4ad4f1bd2925a381ec5c7.2378049970' -> 'C:\Users\Toby\Ap
pData\Local\Temp\jest\jest-transform-cache-3b355e43267006a961f775eebe35ec8b-23cb965d9de5fb025f1c47abdd17736c\52\edgee:slingshot_5227fcb291f4ad4f1bd2925a381ec5c7'
        at Error (native)

      at Function.writeFileSync [as sync] (node_modules/write-file-atomic/index.js:192:8)

To Reproduce

  1. Windows and package with : in it's name (like edgee:slingshot package).
  2. Run jest tests.

Sometimes a tests succeeds; not sure when those cache files are written or renamed.
I assume that writing the files works, because the file edgee exists, but then renaming it will probably fail.

Expected behavior

Jest tests to work even though the package name has a : in its name.

@SimenB
Copy link
Member

SimenB commented Oct 16, 2018

Replacing any : with a valid character in the filename should be easy enough.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants