ojkelly/yarn.build

bug: `yarn bundle` results in an `Internal Error: ENOENT` on Windows

Closed this issue · 1 comments

Describe the bug
When running yarn bundle in Windows 10, this exception is thrown:

Internal Error: ENOENT: no such file or directory, stat '\C:\Users\joshk\AppData\Local\Temp\xfs-42724144\.gitignore'
    at Object.statSync (fs.js:1127:3)
    at Ft.statSync (E:\p\yarn-build-windows\.yarn\releases\yarn-berry.cjs:177:2861)
    at pe.removeEmptyDirectories (E:\p\yarn-build-windows\.yarn\plugins\@ojkelly\plugin-build.cjs:7:35283)
    at pe.removeEmptyDirectories (E:\p\yarn-build-windows\.yarn\plugins\@ojkelly\plugin-build.cjs:7:35382)
    at async pe.removeExcluded (E:\p\yarn-build-windows\.yarn\plugins\@ojkelly\plugin-build.cjs:7:35918)
    at async E:\p\yarn-build-windows\.yarn\plugins\@ojkelly\plugin-build.cjs:7:37895
    at async Ft.mktempPromise (E:\p\yarn-build-windows\.yarn\releases\yarn-berry.cjs:177:62506)
    at async pe.execute (E:\p\yarn-build-windows\.yarn\plugins\@ojkelly\plugin-build.cjs:7:35984)
    at async pe.validateAndExecute (E:\p\yarn-build-windows\.yarn\releases\yarn-berry.cjs:197:620)
    at async ts.run (E:\p\yarn-build-windows\.yarn\releases\yarn-berry.cjs:211:1846)

To Reproduce
Steps to reproduce the behavior:

  1. Clone this repository on a Windows computer: https://github.com/misterjoshua/yarn-build-windows
  2. Type yarn install
  3. Type yarn build
  4. Type cd packages\a
  5. Type yarn bundle

Expected behavior
I expected to receive a .zip bundle of the workspace.

Screenshots
Here's how to reproduce the problem from beginning to end on my desktop:

image

Desktop (please complete the following information):

  • OS: Windows 10 21H1 (not using WSL)

Additional context
Here are some notes:

  • I tested the same steps in WSL and the bundling step succeeded.
  • I checked to see whether the directory C:\Users\joshk\AppData\Local\Temp\xfs-42724144 existed, and it did not.

This is probably a fault of my new addon. Sadly I didn't test this enough on Windows.

I will try to access a windows computer and fix this, unless someone else does it.