admin管理员组

文章数量:1395906

I'm using Webpack for my JS application. For the styles I'm using Sass. My application is pretty big, so I'm using a lot of @mixins and @includes.

In the last couple of days (while the app's SASS-data grew a bit more) I faced the same following error multiple times: "Uncaught RangeError: Maximum call stack size exceeded".

Did anyone of you have this issue with Sass before, too? How does this error occur there usually?

Edit:

Okay, I found out, that recursiveness is not the problem. It works in Mac's Firefox and most of the browsers for Windows, but not for Mac's Chrome and Safari, because their call stack size limit is way lower.

Is there an efficient way to pretend to reach the browser's call stack size that easy? I read about webpack's Uglify, but that does just reduce my app's size, not the amount of calls, right?

Any other ideas?

I'm using Webpack for my JS application. For the styles I'm using Sass. My application is pretty big, so I'm using a lot of @mixins and @includes.

In the last couple of days (while the app's SASS-data grew a bit more) I faced the same following error multiple times: "Uncaught RangeError: Maximum call stack size exceeded".

Did anyone of you have this issue with Sass before, too? How does this error occur there usually?

Edit:

Okay, I found out, that recursiveness is not the problem. It works in Mac's Firefox and most of the browsers for Windows, but not for Mac's Chrome and Safari, because their call stack size limit is way lower.

Is there an efficient way to pretend to reach the browser's call stack size that easy? I read about webpack's Uglify, but that does just reduce my app's size, not the amount of calls, right?

Any other ideas?

Share Improve this question edited Aug 11, 2016 at 17:09 Froxx asked Aug 9, 2016 at 15:36 FroxxFroxx 1,0775 gold badges16 silver badges32 bronze badges 5
  • 1 Can you put up some of the code that causes this error so it can be reproduced? – Naftali Commented Aug 9, 2016 at 15:40
  • I updated my post. Does that help? – Froxx Commented Aug 11, 2016 at 16:57
  • No... No it does not – Naftali Commented Aug 11, 2016 at 17:40
  • I'm getting this too. The stack trace is as follows: Uncaught RangeError: Maximum call stack size exceeded at hotAddUpdateChunk (bootstrap ...:910) at webpackHotUpdateCallback (bootstrap ...:7) at webpackHotUpdateCallback (bootstrap ...:8) ...and repeats... I'm using ["webpack": "^3.10.0"] – Eric Commented Feb 13, 2018 at 17:13
  • in my case, I have a recursive package definition in the package.json file. Taking that out solved my issue – Alberto S. Commented Mar 5, 2020 at 16:44
Add a ment  | 

3 Answers 3

Reset to default 3

I found an answer via: https://github./webpack/webpack/issues/1583

This problem would happen when I made a change to a .less file. [HPM] would notice the change, but fail to update the browser, along with the RangeError.

After menting out new HotModuleReplacementPlugin() in the plugins section, the overflow went away, and the CSS updates started working.

Hope this helps someone else out.

I've faced this same problem recently and came across to this thread but my problem was with React App Build in Webpack and Uglify bundle error. Below changes in the node build mand solved my issues.

Syntax

node --stack-size=<your-size> scripts/build.js

Example

node --stack-size=1000 scripts/build.js

Why size is 1000 in max-old-space-size?

Basically, it varies depends on the call stack of your current application scripts.

How to verify and give right size?

This is basically stay in our engine v8. below mand helps you to understand the Call stack Size of your local node v8 engine.

node --v8-options | grep -B0 -A1 stack-size

I was getting Maximum call stack size exceeded when calling npm install webpack

What made the error go away was running npm uninstall webpack first, and then running npm install webpack again.

本文标签: javascriptWebpackSassMaximum call stack size exceededStack Overflow