V2: FATAL if non-md files (e.g., images) also found in Source Content Folders
See original GitHub issueIs your feature request related to a problem? Please describe
This issue was encountered in #1049. The Content Module fills up the terminal with loads of warnings if the Source Content Folder has images as well. This is especially irksome when the Source Folder is being sourced from elsewhere (using multi-sources feature), where the markdown files live along side the images.
This happens even if no querying is done on the Folder, but the Folder remains in nuxt.config
’s Content’s sources
EDIT: This is not only about warnings, but even on reloading the page (while the terminal is being filled and filled), the page keeps reloading for half a minute. So, kindly not only reduce the warnings, but also ignore the files quickly if they are not md
.
EDIT: If while the page is being reloaded (due to huge no. of images in the Source Folder, the page reloads for such a long time), the app is saved with some changes the queryContent
, this happens. The following happened twice.
FATAL ERROR: v8::FromJust Maybe value is Nothing.
1: 00007FF66D6F013F v8::internal::CodeObjectRegistry::~CodeObjectRegistry+112495
2: 00007FF66D67F396 DSA_meth_get_flags+65526
3: 00007FF66D68024D node::OnFatalError+301
4: 00007FF66DF9C2F5 v8::V8::FromJustIsNothing+53
5: 00007FF66D6683E3 v8::base::CPU::has_sse+31491
6: 00007FF66D752C87 uv_timer_stop+1207
7: 00007FF66D74F25B uv_async_send+331
8: 00007FF66D74E9EC uv_loop_init+1292
9: 00007FF66D74EB8A uv_run+202
10: 00007FF66D71DC95 node::SpinEventLoop+309
11: 00007FF66D5B8660 v8::internal::wasm::SignatureMap::Freeze+35776
12: 00007FF66D5B3CB8 v8::internal::wasm::SignatureMap::Freeze+16920
13: 00007FF66D73F36D uv_poll_stop+557
14: 00007FF66E550C60 v8::internal::compiler::RepresentationChanger::Uint32OverflowOperatorFor+146416
15: 00007FFF3C197034 BaseThreadInitThunk+20
16: 00007FFF3C482651 RtlUserThreadStart+33
npm ERR! code 134
Describe the solution you’d like
- Just show one warning that
images were found inside the Folder
, that’s it.- Don’t show same kind of warning for thousand times for thousand images.
- Ignore the images quickly instead of blocking the entire app and crashing it again and again.
- Note, this issue goes away if I remove the particular folder with many images from my Sources.
Additional context
https://github.com/nuxt/content/issues/1049#issuecomment-1200269761
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top GitHub Comments
@farnabaz It gives this error
Your inline suggestion of
.*\\.png
works perfectly; the one given in block code doesn’t work. Kindly update it. 😀@farnabaz What should be the regex to ignore every file except the one containing in its name “publish”?
For example,
name.publish.md
KEEPname.md
IGNOREname.yml
IGNOREname.publish.yml
KEEPI tried using negative lookahead, but it ignores everything, and doesn’t work.
Use case: I have 8000 notes; I don’t want the Module to scan everything, when I intend to publish on website only handful of these.