TypeError: _gracefulFs(...).realpathSync.native is not a function
See original GitHub issueHi, I got this weird error, am I missing something ?
🐛 Bug Report
When i try to run jest from the cli i got this error. Here is the complete traceback:
TypeError: _gracefulFs(...).realpathSync.native is not a function
at tryRealpath (C:\Users\malau\Documents\ProjetJS\MOPJs\node_modules\jest-config\node_modules\jest-util\build\tryRealpath.js:26:39)
at getCacheDirectory (C:\Users\malau\Documents\ProjetJS\MOPJs\node_modules\jest-config\build\getCacheDirectory.js:89:33)
at Object.<anonymous> (C:\Users\malau\Documents\ProjetJS\MOPJs\node_modules\jest-config\build\Defaults.js:39:50)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
To Reproduce
Steps to reproduce the behavior:
npm install --save-dev jest jest-cli; npx jest --init
or .\node_modules\.bin\jest --init
Even just npx jest
fail with the same error.
Link to repl or repo (highly encouraged)
envinfo
npx: installed 1 in 2.519s
System:
OS: Windows 10 10.0.18362
CPU: (4) x64 Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz
Binaries:
Node: 8.12.0 - C:\Program Files\nodejs\node.EXE
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
npmPackages:
jest: ^26.0.1 => 26.0.1
EDIT: With the latest version of node (14.2.0) it works without any issues.
Thank you in advance for your help !
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:25
Top Results From Across the Web
graceful-fs - npm
graceful-fs. graceful-fs functions as a drop-in replacement for the fs module, making various improvements.
Read more >How to resolve fs.existsSync is not a function - node.js
I was facing the same Error like TypeError: fs.existsSync is not a function. enter image description here. So, I figured out that one...
Read more >TypeError: _gracefulFs(...).realpathSync.native is not a function
执行jest的时候报错:TypeError: _gracefulFs(...).realpathSync.native is not a function解决方案:jest-cli@26.x.x 不支持node8, 使用jest-cli@25.
Read more >fs-extra | Yarn - Package Manager
fs-extra adds file system methods that aren't included in the native fs module and adds promise ... It also uses graceful-fs to prevent...
Read more >How I fixed a "cb.apply is not a function" error while using ...
/usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js:287 if (cb) cb.apply(this, arguments) ^ TypeError: cb.apply ...
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
We do not support node 8, you need to upgrade to node 10 or keep using Jest 25 which supports node 8
What a wonderfully productive way to ensure you get help with your issue
This is part of Node.js core
https://nodejs.org/api/fs.html#fs_fs_realpathsync_native_path_options