remarkjs / react-markdown

Markdown component for React
https://remarkjs.github.io/react-markdown/
MIT License
13.26k stars 876 forks source link

There is an issue with the urltransform prop, this prop is unstable and throwing an error named "Assertion: Unexpected `transformLinkUri` prop, use `urlTransform` instead" #859

Closed Ishuboi07 closed 2 months ago

Ishuboi07 commented 2 months ago

Initial checklist

Affected packages and versions

^9.0.1

Link to runnable example

No response

Steps to reproduce

Installed the library into my Next.js application to transform the LLM's responses as the LLMs respond in markdown language, but after I landed at my home page, my client-side threw an error saying "Assertion: Unexpected transformLinkUri prop, use urlTransform instead"

Expected behavior

There should have been no error ideally as I didn't use the transformLinkUri prop and it was coming from the library itself.

Actual behavior

throwing this error "Assertion: Unexpected transformLinkUri prop, use urlTransform instead"

image

Runtime

Node v17

Package manager

npm 8

OS

Windows

Build and bundle tools

Next.js

ChristianMurphy commented 2 months ago

Welcome @Ishuboi07! 👋 What library are you using that wraps react-markdown? If there is one, open an issue there so they don't set the prop. If you are directly using react markdown, please share a minimal reproducible error of how you got to that error.

github-actions[bot] commented 2 months ago

Hi! Thanks for taking the time to contribute! This has been marked by a maintainer as needing a reproduction: It’s not yet clear whether this is a problem. Here are a couple tips:

Thanks, — bb

Ishuboi07 commented 2 months ago

Welcome @Ishuboi07! 👋 What library are you using that wraps react-markdown? If there is one, open an issue there so they don't set the prop. If you are directly using react markdown, please share a minimal reproducible error of how you got to that error.

There is no library wrapping react-markdown the error is being produced internally but working fine with react-showdown library

Ishuboi07 commented 2 months ago

Welcome @Ishuboi07! 👋 What library are you using that wraps react-markdown? If there is one, open an issue there so they don't set the prop. If you are directly using react markdown, please share a minimal reproducible error of how you got to that error.

There is no library wrapping react-markdown the error is being produced internally but working fine with react-showdown library

You can reproduce the error by wrapping the ReactMarkdown into any text in the nextjs app in a different route. The error pops up into the home route, I converted the whole route into a client side rendered page and imported the component and wrapped the component upon the response received from LLMs since they use markdown language to give response

ChristianMurphy commented 2 months ago

You can reproduce the error by wrapping the ReactMarkdown into any text in the nextjs app in a different route. The error pops up into the home route, I converted the whole route into a client side rendered page and imported the component and wrapped the component upon the response received from LLMs since they use markdown language to give response

@Ishuboi07 that isn't an example, much less a minimal reproducible example (MRE). Here is some context on what an MRE is https://stackoverflow.com/help/minimal-reproducible-example Create a small next app that shows what you are talking about, consider using https://next.new to create and share it.

wooorm commented 2 months ago

Ishaan, millions of people use this project. They have no problems. You have unique problems. You have to be very clear.

Ishuboi07 commented 2 months ago

I don't know how, but it works now. I am sorry for creating this issue, you can close it now

github-actions[bot] commented 2 months ago

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.