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

Cannot find module 'nr1' or its corresponding type declarations. (tsserver 2307) #426

Open v3nd3774 opened 1 year ago

v3nd3774 commented 1 year ago

Hi,

I'm using the following plugins to provide autocomplete in vim for javascript files successfully for react applications:

https://github.com/neoclide/coc.nvim

https://github.com/neoclide/coc-tsserver

The language server is unable to find source code to parse and provide autocomplete snippets for imports such as:

import { ChartGroup } from 'nr1';

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

Is this possible at this time? Wanted to check if anyone had looked at this before.

This is how the nr1 package is installed and the first part of the tutorial series I'm working on, it is not listed in package.json file which I think could be contributing to the problem...:

https://developer.newrelic.com/build-apps/ab-test/install-nr1/

I was able to import snippets for use with coc-snippets from the new relic vs code plugin, could that be used to remove the type declarations error?

https://github.com/newrelic/nr1-vscode-extension