question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

V2: FATAL if non-md files (e.g., images) also found in Source Content Folders

See original GitHub issue

Is 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.

image

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:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ManasMadrechacommented, Aug 7, 2022

@farnabaz It gives this error

 ERROR  [worker reload] [worker init] Invalid regular expression: /^*\.png/: Nothing to repeat

Your inline suggestion of .*\\.png works perfectly; the one given in block code doesn’t work. Kindly update it. 😀

0reactions
ManasMadrechacommented, Nov 4, 2022

@farnabaz What should be the regex to ignore every file except the one containing in its name “publish”?

For example,

  • name.publish.md KEEP
  • name.md IGNORE
  • name.yml IGNORE
  • name.publish.yml KEEP

I tried using negative lookahead, but it ignores everything, and doesn’t work.

content: {
    ignores: [".*\\.(?!publish\\.(?:md|yml|csv))"],
}

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ConfigMgr Content Source Update Tool 1.0.0 - MSEndpointMgr
When for instance a match is found for an object, and the object has content associated, it will be added to the data...
Read more >
Troubleshoot Content Distribution issues - Microsoft Learn
Describes how to troubleshoot common content distribution problems.
Read more >
IPC Scheme Split Software Guide - WIPO
Table of Contents ... The IPC scheme Split tool is one of the software components involved in WIPO ... Note: The same folder...
Read more >
Chapter 4. New features Red Hat Enterprise Linux 9
When an xattr extended attribute is found, the system automatically translates it to security.ima in the final OSTree package content. The treefile file...
Read more >
Git submodule add: "a git directory is found locally" issue
I came to this SO post trying to add a submodule with the same path as a submodule that I recently deleted. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found