lynchjames / obsidian-mind-map

An Obsidian plugin for displaying markdown notes as mind maps using Markmap.
MIT License
1.06k stars 74 forks source link

index.js:44 Uncaught (in promise) TypeError: require.resolve is not a function #7

Closed beet closed 3 years ago

beet commented 3 years ago

Please see the attached stack trace: obsidian.md-1607465769020.log

This only occurs on one of my vaults, the plugin works great in the others, so it's more than likely something unique to my local setup.

I've tried turning off custom themes and disabling all other plugins, but it happens consistently for this one particular vault. Have tried inspecting the contents of .obsidian/ but can't find anything obvious.

The file that raised the exception seems to be node_modules/prismjs/components/index.js

Anything else I could try?

lynchjames commented 3 years ago

Thanks for raising and including the log. It looks like it is related to some particular content that is being parsed.

Are you getting these errors in several notes within a particular vault? If so, is there anything the notes have in common such as formatting. Do they all have code embeds within ``` fences for example?

beet commented 3 years ago

Yes, it did have fenced code blocks! Awesome, thanks, so it wasn't the vault so much as the fact that I happen to keep work-related notes in there containing lots of code snippets.

I've confirmed that simpler notes in that vault do render the mind map.

Thanks again