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

Property 'li' does not exist on type 'JSX.IntrinsicElements' #436

Closed
adoreparler opened this issue Jun 27, 2023 · 5 comments
Closed

Property 'li' does not exist on type 'JSX.IntrinsicElements' #436

adoreparler opened this issue Jun 27, 2023 · 5 comments

Comments

@adoreparler
Copy link

I am new to react and every time I open or write regular html tags I get errors about them using coc-tsserver

## versions

vim version: VIM - Vi IMproved 9.0 9001424
node version: v20.3.1
coc.nvim version: 0.0.82-f52ab48c 2022-12-15 01:56:36 +0800
coc.nvim directory: /Users/seion/.vim/plugged/coc.nvim
term: Apple_Terminal
platform: darwin

## Log of coc.nvim

2023-06-27T16:25:31.106 INFO (pid:39257) [plugin] - coc.nvim initialized with node: v20.3.1 after 107
2023-06-27T16:25:38.416 INFO (pid:39257) [attach] - receive notification: showInfo []
Screenshot 2023-06-27 at 4 28 05 PM

Plugs:

call plug#begin()

" Polyglot is Syntax highlighting
Plug 'sheerun/vim-polyglot'

" Code Completion
Plug 'neoclide/coc.nvim', {'branch': 'release'}

" Side Bar
Plug 'preservim/nerdtree'

" ColorScheme
Plug 'NLKNguyen/papercolor-theme'

" Bottom Bar
Plug 'vim-airline/vim-airline'

Plug 'pangloss/vim-javascript'
Plug 'leafgarland/typescript-vim'
Plug 'peitalin/vim-jsx-typescript'
Plug 'styled-components/vim-styled-components', { 'branch': 'main' }

Plug 'OmniSharp/omnisharp-vim'
Plug 'dense-analysis/ale'
Plug 'nickspoons/vim-sharpenup'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'


call plug#end()
@adoreparler
Copy link
Author

Screenshot 2023-06-28 at 9 44 16 AM

@adoreparler
Copy link
Author

Also want to note that its able to detect all typescript and react elements just fine. Its only complaining about the regular HTML tags like div, li, ul, ect...

@adoreparler
Copy link
Author

I think this is something to do with my tsconfig or node modules installed, because its not happening in another project that has tsx files in it

@ivanalejandro0
Copy link

I was having this same problem (along with some others) and realized that coc-tsserver is using typescript 4.9.3, see:

"typescript": "^4.9.3"
and
typescript@^4.9.3:

and the project I was starting up was using typescript 5.0.2 and there were some incompatibilities.

I solved this by setting "tsserver.useLocalTsdk": true on the coc-settings.json. All the errors I was seeing went away.

I got the solution from #434 (comment), thanks @yaegassy for the explanation.

@chemzqm
Copy link
Member

chemzqm commented Sep 19, 2023

Fixed on [email protected]

@chemzqm chemzqm closed this as completed Sep 19, 2023
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

3 participants