You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem with Markdown and Youtube embeds.
I use react-markdown or react-remark for Markdown and tried to use remark-oembed for Youtube embeds inside Markdown
Example of Markdown:
Text paragraph 1
https://www.youtube.com/watch?v=PRfV5TvRjEA
Text paragraph 2
Everything is OK without package remark-oembed (but Youtube link stays as a string, not transforming to iframe).
After adding remark-oembed I receive the error in console:
error - ./node_modules/cacheable-lookup/source/index.js:10:1
Module not found: Can't resolve 'dns'
null
Maintainer of remark said:
this is coming from next/webpack not polyfilling the package dns.
Could you add polyfill for the dns, please?
Or could you help me with possible solutions?
The same problem stays after I changed the Markdown package from react-markdown to react-remark(it was mentioned in answer remarkjs/remark#742 (comment)):
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a problem with Markdown and Youtube embeds.
I use
react-markdown
orreact-remark
for Markdown and tried to useremark-oembed
for Youtube embeds inside MarkdownExample of Markdown:
Text paragraph 1 https://www.youtube.com/watch?v=PRfV5TvRjEA Text paragraph 2
Everything is OK without package
remark-oembed
(but Youtube link stays as a string, not transforming to iframe).After adding
remark-oembed
I receive the error in console:Maintainer of
remark
said:Could you add polyfill for the dns, please?
Or could you help me with possible solutions?
The full problem is described in remarkjs/remark#742.
My code
The same problem stays after I changed the Markdown package from
react-markdown
toreact-remark
(it was mentioned in answer remarkjs/remark#742 (comment)):Node: 14.16.1
"next": "^10.2.3",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-markdown": "^6.0.2",
"react-remark": "^2.0.3",
"rehype-raw": "^5.1.0",
"rehype-sanitize": "^4.0.0",
"remark": "^13.0.0",
"remark-oembed": "^1.2.2",
"typograf": "^6.12.0"
Beta Was this translation helpful? Give feedback.
All reactions