can't use React Markdown with Next JS #1228
-
I was working on a Next JS application. As I installed react-markdown by using npm install react-markdown, and started dev server, it crashed with the error: **Server Error This error happened while generating the page. Any console logs will be displayed in the terminal window.** I tried cleaning my cache [as it also happened with another package but after cleaning cache and running npm install it resolved] but it didn't solve the issue. As I uninstall react-markdown, my app runs fine without any issues. P.S: Just to be clear, I haven't used Context API anywhere (no state management tool at all) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Welcome @mshaheeruddin! 👋 Some things to consider:
Try searching the problem with your search engine of choice, and the keywords "TypeError: Cannot read properties of null (reading 'useContext') next" |
Beta Was this translation helpful? Give feedback.
Welcome @mshaheeruddin! 👋
Sorry you ran into a spot of trouble.
As @wooorm notes in remarkjs/react-markdown#767 (comment),
react-markdown
doesn't leverage theuseContext
API.It is highly unlikely, nearly impossible for
react-markdown
to be the root cause.Some things to consider:
react
on the page? (though dependencies, check your package lock file)Try searching the problem with your search engine of choice, and the keywords "TypeError: Cannot read properties of null (reading 'useContext') next"