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

Out-of-memory in development mode. #16827

Open
avendiart opened this issue Nov 29, 2021 · 10 comments
Open

Out-of-memory in development mode. #16827

avendiart opened this issue Nov 29, 2021 · 10 comments

Comments

@avendiart
Copy link
Contributor

Describe the bug
Out-of-memory in development mode. Static build works fine.

To Reproduce
Check out https://github.com/avendiart/storybook-issue, first commit is without the crash, the latest crashes. Start storybook, switch to the Buttons story to Docs. Please note, that is the most minimal reproduction I could come up with. With a different storybook, which I unfortunately can't share, crashes without even switching to the tab.

System

Environment Info:

  System:
    OS: Linux 5.10 Ubuntu 20.04 LTS (Focal Fossa)
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.0/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
  npmPackages:
    @storybook/addon-actions: ^6.4.0 => 6.4.0 
    @storybook/addon-essentials: ^6.4.0 => 6.4.0 
    @storybook/addon-links: ^6.4.0 => 6.4.0 
    @storybook/react: ^6.4.0 => 6.4.0

Additional context
I've managed to pinpoint the issue to react-element-to-jsx-string starting from version 14.3.3. I'd assume that either the library itself or one of it's dependencies causes the crash.

@angry-meow
Copy link

angry-meow commented Nov 30, 2021

Thank you for the info, @avendiart.

I met the similar problem. Then rollbacked react-element-to-jsx-string down to version 14.3.2 in the dependency tree. And now it works well!

I wanted to create a new issue but I can see yours in the react-element-to-jsx-string repo. I have a clean repo with the reproduction in Storybook. Do you need it published? Or we should wait for the solution from the package developers?

@angry-meow
Copy link

FYI, there is a problem not only on the Docs page.

In special cases there is "freezing" even on Canvas page but since all the component stories are on the Docs page, this page really crashes.

@avendiart
Copy link
Contributor Author

@angry-meow probably a reproduction repo with crashes in canvas would help maintainers to narrow it down. I've experienced these crashes as well as I mentioned above, but I don't have a reproduction for it available.

@angry-meow
Copy link

angry-meow commented Dec 24, 2021

@shilman, is it possible to specify the dependency version as 14.3.2? The problem still makes the work unreal. Storybook worked fine with 14.3.2.

@shilman
Copy link
Member

shilman commented Dec 24, 2021

@angry-meow Good call. Can you open a PR for that? I can merge and release

@angry-meow
Copy link

@shilman, yes, no problem

@angry-meow
Copy link

angry-meow commented Dec 24, 2021

@shilman Done

@RuudBurger
Copy link

For anyone coming across this issue. You can downgrade using the resolutions in your package.json

"resolutions": {
  "react-element-to-jsx-string": "14.3.2"
},

@IanVS
Copy link
Member

IanVS commented Sep 4, 2022

It sounds like the maintainer of react-element-to-jsx-string is willing to accept a PR that reverts 14.3.3. If someone who is experiencing this issue could look into which of the changes in that release started to cause the problem, I'm sure a targeted revert would be appreciated. algolia/react-element-to-jsx-string#681.

@lovemegowin
Copy link

Thank you for the info, @avendiart.

I met the similar problem. Then rollbacked react-element-to-jsx-string down to version 14.3.2 in the dependency tree. And now it works well!

I wanted to create a new issue but I can see yours in the react-element-to-jsx-string repo. I have a clean repo with the reproduction in Storybook. Do you need it published? Or we should wait for the solution from the package developers?

Hi, @angry-meow perfect work, by the way, could you please share the process of how to location this problem. Curiosity of Pure Private Learning, thank you!

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

Successfully merging a pull request may close this issue.

6 participants