Skip to content

Failed to judge when using exports #946

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

Open
riparuk opened this issue Mar 8, 2025 · 6 comments
Open

Failed to judge when using exports #946

riparuk opened this issue Mar 8, 2025 · 6 comments

Comments

@riparuk
Copy link

riparuk commented Mar 8, 2025

In my typescript project, I'm using exports in package.json

Image The `ts_la` can't detect the alias path that I'm using. I'm using the lsp in nvim with lspconfig, in nvim it shows like this : Image

it should not be error, the program works fine, compiled and be able to run.

In vscode, with the same code, using their typescript lsp, there is no error shown :

Image

when using ts_ls in nvim, the code that should be error, nothing happends, seems fine, but its error.

Image

In vscode, otherwise, its error, and it's true :

Image
@riparuk
Copy link
Author

riparuk commented Mar 8, 2025

idk what typescript feature is called, the lsp just not seems work

@riparuk
Copy link
Author

riparuk commented Mar 9, 2025

Now I'm using nvim-vtsls as an alternative

@caisah
Copy link

caisah commented Mar 17, 2025

I think you should configure your compilerOptions from tsconfig.json for your project. Try

 "compilerOptions": {
    "moduleResolution": "nodenext",
    "module": "nodenext"
}

@riparuk
Copy link
Author

riparuk commented Mar 21, 2025

I tried, it still shows the error

Image Image

@riparuk
Copy link
Author

riparuk commented Mar 21, 2025

the exports look like :

Image

@rchl
Copy link
Member

rchl commented Mar 23, 2025

This LSP server doesn't really have any say on how this behaves. The only ones that do are the specific version of TS that you are using and you tsconfig.json settings.

If it works in vtsls then it could be related to implicit settings that either of those server uses and which could differ since this server has not kept up with upstream changes. But if implicit settings play a role here then that would mean that your tsconfig.json is not being used.

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