Skip to content

Out of memory error when invoking Storybook #1496

@dthyresson

Description

@dthyresson

When running

yarn rw storybook

I get a success:

│   Storybook 5.3.21 started                        │
│   9.18 s for manager and 10 s for preview         │
│                                                   │
│    Local:            http://localhost:7910/       │
│    On your network:  http://192.168.7.53:7910/  

But then a memory error:

info => Loading presets
info => Loading presets
info => Loading custom babel config as JS
info => Loading custom babel config as JS
info => Loading config/preview file in "../node_modules/@redwoodjs/core/config/storybook".
info => Adding stories defined in "../node_modules/@redwoodjs/core/config/storybook/main.js".
info => Using default Webpack setup.
info => Using base config because react-scripts is not installed.
webpack built 925c20b607c416ca0164 in 9318ms
╭───────────────────────────────────────────────────╮
│                                                   │
│   Storybook 5.3.21 started                        │
│   9.18 s for manager and 10 s for preview         │
│                                                   │
│    Local:            http://localhost:7910/       │
│    On your network:  http://192.168.7.53:7910/    │
│                                                   │
╰───────────────────────────────────────────────────╯
webpack building...
webpack built ff9c7c60946b6ae54aee in 15906ms
webpack building...
70% building 2/2 modules 0 active
<--- Last few GCs --->

[98773:0x108008000]   172516 ms: Mark-sweep (reduce) 4034.6 (4104.4) -> 4032.2 (4104.4) MB, 4576.8 / 5.2 ms  (average mu = 0.163, current mu = 0.061) allocation failure scavenge might not succeed
[98773:0x108008000]   177124 ms: Mark-sweep (reduce) 4033.2 (4101.4) -> 4032.4 (4102.9) MB, 4601.4 / 5.1 ms  (average mu = 0.087, current mu = 0.001) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Redwood Info

  System:
    OS: macOS 10.15.5
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.7.0 - /var/folders/qx/5bk1sx455zvfqj79wyr83fkc0000gn/T/yarn--1605818765563-0.1875092502589415/node
    Yarn: 1.22.10 - /var/folders/qx/5bk1sx455zvfqj79wyr83fkc0000gn/T/yarn--1605818765563-0.1875092502589415/yarn
  Databases:
    SQLite: 3.28.0 - /usr/bin/sqlite3
  Browsers:
    Chrome: 87.0.4280.67
    Safari: 13.1.1
  npmPackages:
    @redwoodjs/core: ^0.20.1-canary.36 => 0.20.1-canary.38+a94595a9 

Note: running a canary release because it fixes an issue where I could not run Storybook dues to having a space in my command path

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions