node-fs-extra: Fs-extra v8, copy function gives error when using with jest
- Operating System: mac os 10.13.4
- Node.js version: 12.1.0
fs-extra
version: 8.0.1
Hey, π
After updating fs-extra
from v7 to v8, jest tests started to give error for copy
function:
TypeError: cb.apply is not a function
Here is same reproduction repo with failing test. The repo has only two commits, one is with v7 and no error, second is just an update to v8 and with error.
I saw this from travis, which gave error for node v10 and v12, but not for v8. Here is travis log. Rollback to v7 removes error.
Any idea why this is happening? π€
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 20
Commits related to this issue
- chore: revert fs-extra to 7.x to fix incompatibilities with graceful-fs See: https://github.com/jprichardson/node-fs-extra/issues/687 — committed to vuejs/vue-cli by sodatea 5 years ago
- Reverted fs-extra to version 7.0.1 due to issues with Jest https://github.com/jprichardson/node-fs-extra/issues/687 — committed to Satyam/lacorazon-gql-server by Satyam 5 years ago
- Downgraded dep to fs-extra to prevent Jest issues in Travis. https://github.com/jprichardson/node-fs-extra/issues/687 — committed to sebastian-software/rollup-plugin-rebase by swernerx 5 years ago
The root problem is that graceful-fs is broken and needs updates. Not sure how to get action there.
Just checked, the issue is fixed for me when using graceful-fs 4.2.0.
graceful-fs
issue is fixed, Iβm thinking this issue should be fixed by reinstalling/regenerating the lockfiles to get the latest graceful-fs. Let me know if itβs not.