Tuesday, 18 April 2017

Node JS - "JavaScript heap out of memory" on Visual Studio Code

I am reading a 27MB pdf file into a variable using:

var fs = require('fs');
var data = fs.readFile(path, callback);

This works fine when i launch my Node application using Windows command, but when i try to run and debug it on Visual Studio Code the same piece of code throws an exception:

FATAL ERROR: invalid table size Allocation failed - JavaScript heap out of memory

I think the memory amount for VSC debugging is very low, is there a way to increase it? Or i need to find another editor?



via Carlos ABS

No comments:

Post a Comment