react-scroll icon indicating copy to clipboard operation
react-scroll copied to clipboard

'Link' cannot be used as a JSX component.

Open gabrielmielo opened this issue 2 years ago • 14 comments

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

gabrielmielo avatar Oct 11 '23 13:10 gabrielmielo

I am also facing a similar issue:

Screenshot 2023-10-17 at 13 49 52

@fisshy any ideas?

taylor-lindores-reeves avatar Oct 17 '23 12:10 taylor-lindores-reeves

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

KilianSL avatar Oct 19 '23 14:10 KilianSL

@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.

taylor-lindores-reeves avatar Oct 19 '23 16:10 taylor-lindores-reeves

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

nhebling avatar Nov 10 '23 20:11 nhebling

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

takahiro-1227 avatar Dec 06 '23 07:12 takahiro-1227

Same problem

react: 18.2.0 react-scroll: 1.9.0

carl0shd avatar Dec 11 '23 06:12 carl0shd

any resolutions yet for this?

ahsanz024 avatar Dec 28 '23 12:12 ahsanz024

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.

flymee8 avatar Jan 05 '24 00:01 flymee8

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 :(

carl0shd avatar Jan 05 '24 05:01 carl0shd

I have same issue. Do you have any update?

chuanhan avatar Feb 27 '24 13:02 chuanhan

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

frvnkhl avatar Mar 01 '24 16:03 frvnkhl