Maximum call stack size exceeded
See original GitHub issue🐛 Bug Report
When running acceptance tests, I am sometimes getting a maximum call stack size error.
RangeError: Maximum call stack size exceeded
at Function.[Symbol.hasInstance] (<anonymous>)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:200:14)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
at WriteStream (node_modules/graceful-fs/graceful-fs.js:201:29)
To Reproduce
Sorry, but I cannot reproduce it 100%. It sometimes happens when I create a writable stream:
const fs = require('fs');
describe('xxx', () => {
it('will sometimes exit on max call stack', () => {
fs.createWriteStream('test.log', { flags: 'a' })
})
})
Expected behavior
Does not crash on max. call stack.
Link to repl or repo (highly encouraged)
It seems to sometimes reproduce on this repository: https://github.com/alesmenzel/churchill
when running the npm run test:acceptance -- file
here is a screenshot from travis-ci running the tests ( https://prnt.sc/pkr5zy )
envinfo
System:
OS: macOS Mojave 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Binaries:
Node: 12.12.0 - ~/.nvm/versions/node/v12.12.0/bin/node
Yarn: 1.17.3 - ~/.nvm/versions/node/v10.16.0/bin/yarn
npm: 6.11.3 - ~/.nvm/versions/node/v12.12.0/bin/npm
npmPackages:
jest: ^24.9.0 => 24.9.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
javascript - Maximum call stack size exceeded error
It means that somewhere in your code, you are calling a function which in turn calls another function and so forth, until you...
Read more >JavaScript Error: Maximum Call Stack Size Exceeded
If you see the “Maximum Call Stack Size Exceeded” error, there's likely a problem with a recursive function within your JavaScript code.
Read more >RangeError: Maximum call stack size exceeded - Educative.io
The most common source for this error is infinite recursion. You must have a recursive function in your code whose base case is...
Read more >Uncaught RangeError: Maximum call ... - Net-Informations.Com
Maximum call stack size exceeded error ... This error is almost always means you have a problem with recursion in JavaScript code, as...
Read more >How to fix: "RangeError: Maximum call stack size exceeded"
A "RangeError: Maximum call stack size exceeded" is an error that occurs when a function or operation tries to execute too many nested...
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
+1 If it helps, I tried a second time
npm i --save-dev jest
and it worked this time,Looks like this was resolved in
v4.2.3
ofgraceful-fs
: https://github.com/isaacs/node-graceful-fs/issues/174