Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeError: Maximum call stack size exceeded #194

Open
oorestisime opened this issue Sep 15, 2020 · 5 comments
Open

RangeError: Maximum call stack size exceeded #194

oorestisime opened this issue Sep 15, 2020 · 5 comments

Comments

@oorestisime
Copy link
Contributor

I am getting this error when trying to deploy a large bucket.

RangeError: Maximum call stack size exceeded
    at /home/circleci/bold/frontend/node_modules/gatsby-plugin-s3/node_modules/klaw/src/index.js:53:23
    at go$readdir$cb (/home/circleci/bold/frontend/node_modules/graceful-fs/graceful-fs.js:162:14)
    at FSReqWrap.args [as oncomplete] (fs.js:140:20)

Seems to be caused by jprichardson/node-klaw#37

Not sure if anyone has workaround.
I am willing to make the change to walk if you agree , or if there's something else to do here to fix it :)

@YoshiWalsh
Copy link
Collaborator

I don't think we're particularly attached to klaw. I'd be happy to review a PR that replaces it with walk.

@oorestisime
Copy link
Contributor Author

Hey i am wondering if you have any ideas on how to test this out. Would it work if i build the plugin and just call the bin.js with the right environment variables?
if this works i could test on circleci as well by sshing in to test it works with our large bucket.

@YoshiWalsh
Copy link
Collaborator

You can use npm link to symlink your local copy of the plugin into your site. See here: https://www.gatsbyjs.com/docs/creating-a-local-plugin/#using-npm-link-or-yarn-link

This is likely something that we won't test in our e2e test suite, as I think generating and uploading ~200,000 files each test run would make the tests quite slow.

Thanks!

@oorestisime
Copy link
Contributor Author

Looks like its way too slow walk. plus it needed a lot of changes given that it doesn't have streamable reads. i making a PR in klaw to fix. Should i keep open to notify once its released so we can update the plugin dependency as well?

@YoshiWalsh
Copy link
Collaborator

Please do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants