fisshy / react-scroll

React scroll component
https://github.com/fisshy/react-scroll/blob/master/README.md
MIT License
4.36k stars 437 forks source link

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

Open gabrielsoaresgsm opened 1 year ago

gabrielsoaresgsm commented 1 year ago

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 commented 1 year ago

I am also facing a similar issue:

Screenshot 2023-10-17 at 13 49 52

@fisshy any ideas?

KilianSL commented 1 year ago

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

taylor-lindores-reeves commented 1 year ago

@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 commented 1 year ago

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

takahiro-1227 commented 11 months ago

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

carl0shd commented 11 months ago

Same problem

react: 18.2.0 react-scroll: 1.9.0

ahsanz024 commented 10 months ago

any resolutions yet for this?

flymee8 commented 10 months ago

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 commented 10 months ago

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 commented 8 months ago

I have same issue. Do you have any update?

frvnkhl commented 8 months ago

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