-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Build segfaults on Node.js v16 if config contains empty middleware array #893
Comments
Can you provide the error please? I cannot reproduce, and I don't believe middlewares are used in any part of the build process. |
This is segfault.
Config that does not segfault:
Config that segfaults always:
If |
That's really interesting. Can you share the debug info? |
And on Mac OS 11.6.1 (node & npm versions exactly as on my Linux box):
Debug output from MacOS:
|
Downgraded node to v14.18.1 and everything works fine again. |
Just wanted to comment that I too encountered some bizarre segfaults with Node 16, though it was entirely inconsistent and would occur seemingly post-prerender? Output would be generated just fine, but 50% of the time I'd be hit with a lovely Downgraded back to Node 14 too, no issues here. Really weird. Edit: No config from me, so shouldn't be related to that in any way. Will try to track this down when I have some time, could just be buggy Node I suppose? |
I've seen less of segfaults after upgrading npm to some later version, 8.1.2 or 8.1.3. |
Interesting. Yarn for me, though did have latest NPM (8.1.3). |
I think this is a duplicate issue: #896 (comment) I too am experiencing the random segmentation fault that prevents WMR prerender build from completing (missing HTML files in dist folder, and segfault in console). I am on MacOS, Node version |
...I should also point out that WMR |
Yes, it seems I was too quick assuming there's any relation. |
Should we close this as a duplicate of #896? |
I can reproduce this on yarn create wmr hello-preact-wmr
yarn build It's 60-70% chance to get
Not sure what the root cause is. |
Describe the bug
If config contains empty array of middlewares,
wmr run build
ends with segfault.To Reproduce
Steps to reproduce the behavior:
npm init wmr@latest myproject
,cd
tomyproject
wmr.config.mjs
addmiddleware: []
to config objectRun npm run build
Expected behavior
Build finishes successfully
Bug occurs with:
wmr
orwmr start
(development)wmr build
(production)wmr serve
Desktop (please complete the following information):
Additional context
Sometimes build finishes fine if
middleware
isnull
orundefined
but fails at random. When set to empty array build failed in 20/20 attempts.The text was updated successfully, but these errors were encountered: