Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Link' cannot be used as a JSX component. #566

Open
gabrielsoaresgsm opened this issue Oct 11, 2023 · 11 comments
Open

'Link' cannot be used as a JSX component. #566

gabrielsoaresgsm opened this issue Oct 11, 2023 · 11 comments

Comments

@gabrielsoaresgsm
Copy link

Erro: 'Link' cannot be used as a JSX component.
Its type 'typeof Link' is not a valid JSX element type.ts(2786)

I'm having a problem using the Link.

Version I'm using:

"react-scroll": "^1.9.0",
"next": "13.4.5",
"react": "^18.2.0",
"react-dom": "18.2.0",
"@types/react": "18.2.12",
"@types/react-scroll": "^1.8.7",

I would like some help to resolve this issue. It works correctly. but it is giving build error in vercel

image
CODIGO
image

@taylor-lindores-reeves
Copy link

taylor-lindores-reeves commented Oct 17, 2023

I am also facing a similar issue:

Screenshot 2023-10-17 at 13 49 52

@fisshy any ideas?

@KilianSL
Copy link

Have also bee experiencing this issue as of last week with "Link" and "Element" components.

@taylor-lindores-reeves
Copy link

@KilianSL the issue for me was the "resolutions" field in my package.json was set to an earlier version of reactjs. I updated it to match the reactjs version I had installed in my dependencies.

@nhebling
Copy link

Same problem here with react 18.2.0.
Also tried to enforce the version by using "resolutions" field but no success.

@takahiro-1227
Copy link

I experienced same problem when I upgraded react from 16.14.0 to 18.2.0

@carl0shd
Copy link

Same problem

react: 18.2.0
react-scroll: 1.9.0

@ahsanz024
Copy link

any resolutions yet for this?

@flymee8
Copy link

flymee8 commented Jan 5, 2024

I resolved problem by using @types/react 18.2.3.

I experienced same problem when I upgraded @types/react from 18.2.3 to 18.2.46.

@carl0shd
Copy link

carl0shd commented Jan 5, 2024

I resolved problem by using @types/react 18.2.3.

I experienced same problem when I upgraded @types/react from 18.2.3 to 18.2.46.

same problem using 18.2.3 :(

@chuanhan
Copy link

I have same issue.
Do you have any update?

@frvnkhl
Copy link

frvnkhl commented Mar 1, 2024

I also have this issue. Does anyone have any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants