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

Cannot find namespace 'JSX' #695

Open
hieunguyen2211 opened this issue Mar 6, 2025 · 1 comment
Open

Cannot find namespace 'JSX' #695

hieunguyen2211 opened this issue Mar 6, 2025 · 1 comment

Comments

@hieunguyen2211
Copy link

Describe the bug
I got this error message after using version 4.7.0 with React 19 without setting "skipLibCheck" to true in "tsconfig.json":

../node_modules/@monaco-editor/react/dist/index.d.ts(106,295): error TS2503: Cannot find namespace 'JSX'.

Expected behavior
There is no error if "skipLibCheck" is set to false.

@elijaholmos
Copy link

I'm getting an error which may be related (React 19 & monaco editor v4.7.0):

'Editor' cannot be used as a JSX component.
  Its type 'MemoExoticComponent<({ defaultValue, defaultLanguage, defaultPath, value, language, path, theme, line, loading, options, overrideServices, saveViewState, keepCurrentModel, width, height, className, wrapperProps, beforeMount, onMount, onChange, onValidate, }: EditorProps) => Element>' is not a valid JSX element type.
    Type 'MemoExoticComponent<({ defaultValue, defaultLanguage, defaultPath, value, language, path, theme, line, loading, options, overrideServices, saveViewState, keepCurrentModel, width, height, className, wrapperProps, beforeMount, onMount, onChange, onValidate, }: EditorProps) => Element>' is not assignable to type '(props: any) => ReactNode | Promise<ReactNode>'.
      Types of parameters 'props' and 'props' are incompatible.
        Type 'any' is not assignable to type 'never'.ts(2786)

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

2 participants