'Signup' refers to a value, but is being used as a type here. Did you mean 'typeof Signup'?ts(2749) #64711
Replies: 5 comments 3 replies
-
Hi, To work with JSX, you must use I'd say, reopen your editor, or Otherwise, delete Also make sure that VSCode is using your project's TypeScript version, and not its own. |
Beta Was this translation helpful? Give feedback.
-
Any resolution facing same issue tried all the things mentioned by @WILSON2624 |
Beta Was this translation helpful? Give feedback.
-
this has been intermittently plaguing builds for other frameworks I can flush this error out in my code by directly using a mongoose type like Document so this appears to be a glitch in the compiler or code with a major limp anyone receiving this error should probably research esm/commonjs compatibility typescript needs to navigate import statements and types (it uses a search algorithm) during compilation. In my case my shared-util-isomorphic library emits esm/commonjs interfaces in its package.json when installed to accomodate esm/commonjs |
Beta Was this translation helpful? Give feedback.
-
sorry if my answer deviates to more of the back end I am fullstack your code looks more all front end UI what I would then research are circular dependencies that do cause the compiler to cave circular dependencies lurk everywhere in the field and few know about this import statements are the center piece I use a dependency graph to visualize what depends on what, rooting out self referencing imports within libraries, crazy constructed relative imports that span folders and should not, the list goes on |
Beta Was this translation helpful? Give feedback.
-
Summary
I have a nextjs 14 project configured with Typescript. Most of the JSX returned in react components are giving this error when I hover over it. 'Signup' refers to a value, but is being used as a type here. Did you mean 'typeof Signup'?ts(2749). Signup in this case is a custom component. The code run properly without Issues. I am using visual studio code editor. I have seen people advising to use .tsx instead of .ts. I have done that but it is not solving the problem. It denies me the benefits of intellisence.

I have pasted my Signup component code under Additional information
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions