Skip to content

fileURLToPath not found in 'url' webpack 5 #1306

Answered by ChristianMurphy
nullhook asked this question in Q&A
Discussion options

You must be logged in to vote

Welcome @nullhook!
Sorry you ran into a spot of trouble.

vFile provides a browser compatible implementation out of the box https://github.com/vfile/vfile/blob/de87feae24b65cd21975022636b70b0ad7331342/package.json#L36-L50
Something in your webpack configuration it telling webpack you aren't running in a browser, but instead are running in node.

why is VFile required in react-markdown?

Because react-markdown, remark, and unified work on virtual files provided by vfile.
It is used extensively at many levels of the dependency tree.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ChristianMurphy
Comment options

You must be logged in to vote
1 reply
@ChristianMurphy
Comment options

Comment options

You must be logged in to vote
1 reply
@ChristianMurphy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants