-
Notifications
You must be signed in to change notification settings - Fork 87
Maximum call stack exceeded #208
Comments
Have u resolved ur issue by any chance? Not sure if I should dive into it. |
@Andarist , I just tried the reproducible example (linked above, also here) and the issue is still happening for me.
If you get around to digging in, I'd be curious to know if you find anything! |
Rollup has swallowed original stack trace - which is:
This ofc happens when using standalone babel - without wrapping it in rollup. From what I have checked it fails in transform-react-remove-prop-types's isStatelessComponent function. I think it tries to follow ur returned value to check if it returns JSX under the hood, but because of recursive nature of your library it just blows up the stack. I recommend filing issue in that project - in your case it could be fixed by checking if PS. You could also mention when creating issue in their repo that recursive functions can blow stack stack there, and they should guard against such situation too. |
@Andarist , thank you so much for looking into this! I don't think that I have the Rollup knowledge to have figured this out myself. I'll go ahead and open an issue on that project. Thank you! |
@Andarist I'm looking into the issue. How can I have access to the original stack trace? |
I've just wrapped this line manually in try/catch, logged the error and rethrow it. Want to prepare a PR for rollup to log the stack trace, because its imho too valuable info to just swallow it - but just couldnt get time to do that at the moment. This error should be reproducible with bare babel too, so it might be easier for you to just run babel via JS api in node to debug this. |
@Andarist Thanks, well, it's a funny issue 😆. The babel plugin is using a recursive logic, so does the source code it's trying to explore. Let's see how I can fix that. |
It looks like @oliviertassinari figured it out, and got this released as Thank you both! I don't think I would have been able to figure this out without the two of you! |
👋 Hi there! I am really enjoying this library. I recently ran into a problem when trying to use it with a particular Babel plugin. I'm wondering if anyone has seen anything similar?
The Problem
I am getting a maximum call stack exceeded when using rollup-plugin-babel along with the transform-react-remove-prop-types plugin.
The specific error is:
I'm not too familiar with the internals of Rollup or this plugin, so I was wondering if anyone here had any thoughts.
Reproducible Example
Pull down this branch of react-composer and run
npm run build:umd:min
.The Configuration
.babelrc
rollup.config.js
Node 8.11.1
npm 5.8.0
Versions of things
If you have any thoughts as to what might be going on, I'd love to hear it. If you think this isn't the right place for this issue, then no problem! Thank you for taking a look! 👍
The text was updated successfully, but these errors were encountered: