You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case, the 1,347,625 bytes of output exceeds the default maximum of 1,048,576 bytes, causing compodoc to be terminated.
I've done some investigating and found three bits of evidence that support this idea:
If I suppress compodoc's output with...
npx ng run myproject:storybook --compodoc-args='--silent --exportFormat=json'
... then storybook builds/starts just fine.
If I modify JSPackageManager#executeCommand, so that it defaults to "inherit" instead of "pipe", then all of compodoc's output is shown on my console instead of being buffered. This allows me to build/start storybook successfully.
If I modify JSPackageManager#executeCommand, so that its maxBuffer is arbitrarily huge (e.g. 3000000), then the output is buffered successfully and is output when the spawned compodoc finishes. Storybook then proceeds successfully.
Possible solutions:
For those encountering this problem today, passing --silent to --compodoc-args is a fine workaround.
As a more permanent solution, I think it may be a good idea to change runCompodoc to use inherit for stdio. Setting the maxBuffer arbitrarily high doesn't sound as sustainable, as some folks may require an even higher buffer.
The text was updated successfully, but these errors were encountered:
michael-wisely-gravwell
changed the title
[Bug]: Storybook fails to build large on Angular projects due to excessive Compodoc output
[Bug]: Storybook fails to build on large Angular projects due to excessive Compodoc output
May 4, 2023
Describe the bug
The
start-storybook
andbuild-storybook
builders fail with exit code 127 on large Angular projects.There is no output over stdout or stderr. There are no files produced. There is only a non-zero exit code.
This is what I see when I attempt to run the
start-storybook
builder:Please see Additional Context for an explanation of what I believe is causing this failure as well as some possible solutions.
To Reproduce
No response
System
Additional context
The problem appears to be due to the fact that...
maxBuffer
onspawnSync
is1024*1024 = 1,048,576 bytes
In my case, the 1,347,625 bytes of output exceeds the default maximum of 1,048,576 bytes, causing compodoc to be terminated.
I've done some investigating and found three bits of evidence that support this idea:
If I suppress compodoc's output with...
... then storybook builds/starts just fine.
If I modify
JSPackageManager#executeCommand
, so that it defaults to "inherit" instead of "pipe", then all of compodoc's output is shown on my console instead of being buffered. This allows me to build/start storybook successfully.If I modify
JSPackageManager#executeCommand
, so that itsmaxBuffer
is arbitrarily huge (e.g.3000000
), then the output is buffered successfully and is output when the spawned compodoc finishes. Storybook then proceeds successfully.Possible solutions:
--silent
to--compodoc-args
is a fine workaround.runCompodoc
to useinherit
for stdio. Setting themaxBuffer
arbitrarily high doesn't sound as sustainable, as some folks may require an even higher buffer.The text was updated successfully, but these errors were encountered: