memfs breaks with fs-extra^10.0.0
See original GitHub issuememfs
does not export fs.realpath.native
. It is available since Node.js 9.2.0.
https://nodejs.org/api/fs.html#fsrealpathnativepath-options-callback
fs-extra
uses univeralify to create a promise version of fs.realpath.native. Because memfs does not provide it, universalify throws a error:
TypeError: Cannot read properties of undefined (reading 'name')
at Object.<anonymous>.exports.fromCallback (../../node_modules/fs-extra/node_modules/universalify/index.js:15:26)
at Object.<anonymous> (../../node_modules/fs-extra/lib/fs/index.js:57:27)
at Object.<anonymous> (../../node_modules/fs-extra/lib/index.js:5:6)
The error occurs even if realpath.native is not used.
The line of code: https://github.com/jprichardson/node-fs-extra/blob/a84ef6dd8969f57d16e23267e1790def791e9a82/lib/fs/index.js#L57
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:13
Top Results From Across the Web
Node.js: fs-extra
fs -extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.
Read more >memfs | Yarn - Package Manager
memfs. In-memory file-system with Node's fs API. Node's fs API implemented, see old API Status, missing list, missing opendir; Stores files in memory, ......
Read more >node-fs-extra
Starting with fs-extra 10.0.0 on node 14.14+, failures to rm a file that exists, but is in an unwritable directory, fail silently. fs-extra...
Read more >Dependencies | @backstage/cli | npm
arrow_right @babel/core. 7.20.5 Notes
Version 7.20.5 Published November 28...
arrow_right @babel/plugin‑transform‑modules‑commonjs. 7.19.6 Notes
Version 7.19.6 Published October 20, 20...
Read more >Npm package installation error on other partition
... 156 silly audit 'fs-extra': [ '9.1.0', '10.1.0' ], 156 silly audit tapable: ... 156 silly audit memfs: [ '3.4.1' ], 156 silly...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@peteriman I’m gonna look into it on monday. Hope it was no wrong report from my side.
@G-Rath, assuming it’s not a NodeJS <9.2.0 issue, I am unable to replicate it using NodeJS 14 with
memfs@^3.4.1
.Might need more details from @Phillip9587. It is also possible to be an inherent
nx
behaviour that alteredfs
but reported wrongly as https://github.com/nrwl/nx/pull/8531.