Howtodojo logo
  • Home 
  • About 
  • Certifications 
  • Sample Database 
  • Cheatsheet 
  • Glossary 
  • Blog 
  • Tags 
  1.   Blog
  1. Home
  2. Blog
  3. Netlify deploy RangeError: Maximum call stack size exceeded

Netlify deploy RangeError: Maximum call stack size exceeded

Share via
Howtodojo
Link copied to clipboard

This morning I was deploying one of the site on our network to Netlify using the usual command. But after the CDN diffing files I got the following error message RangeError: Maximum call stack size exceeded

Netlify deploy RangeError: Maximum call stack size exceeded

This morning I was deploying one of the site on our network to Netlify using the usual command:

netlify deploy --prod
```bash

But after the CDN diffing files I got the following error message

```bash
RangeError: Maximum call stack size exceeded

How To Fix  

Firstly, create new file in /usr/bin/node_bin with the contents below:

#!/bin/bash

/usr/bin/node --stack-size=10000 $@
```bash

You can modify the stack-size number to higher number if needed.

After that, change the file permission to 755.

```bash
sudo chmod 755 /usr/bin/node_bin

Check netlify-cli installation path using which netlify command. Mine is located at /usr/bin/netlify since I installed netlify cli globally.

Edit the netlify file, change the first line from:

#!/usr/bin/env node
```bash

to

```bash
#!/usr/bin/env node_bin

This way the node will be invoked with custom --stack-size number.

I hope this is useful and happy deploying!

 How To Install PostgreSQL 14 on Ubuntu 20.04
How to Enable EPEL Repository on CentOS 8 
Follow me

We publish tutorials, tips and tricks about Linux, open source, cloud computing, and infrastructure

     
Copyright © 2012 - 2025 howtodojo.com. |
Howtodojo
Code copied to clipboard