neoclide / coc-tsserver

Tsserver extension for coc.nvim that provide rich features like VSCode for javascript & typescript
MIT License
1.06k stars 68 forks source link

Ignoring tsconfig "types": ["node"] #416

Closed myarcana closed 1 year ago

myarcana commented 1 year ago

My tsconfig.json specifies "types": ["node"], but nvm thinks that the first line of the sibling ts file import * as path from 'path'; has a

Cannot find module 'path' or its corresponding type declarations. (tsserver 2307)

error. ts-node that-file.ts runs perfectly fine, it's only inside of nvim that I see this "error"

chemzqm commented 1 year ago

You may need "moduleResolution": "node" in your tsconfig.json