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

Deno LSP suggests incorrect imports #27661

Open
soyboi opened this issue Jan 14, 2025 · 0 comments
Open

Deno LSP suggests incorrect imports #27661

soyboi opened this issue Jan 14, 2025 · 0 comments
Labels
bug Something isn't working correctly lsp related to the language server

Comments

@soyboi
Copy link

soyboi commented Jan 14, 2025

Version: Deno 2.1.5+5a39f2f

Hey,

I'm not 100% sure if this is due to Deno's LSP or jetbrains. I am aware that the Jetbrains deno plugin is pretty bad, so sorry if this is unrelated to Deno.

When I am trying to import QueryClientProvider from react-query, I get some odd suggestions for where to import it from, as show in the screenshot:

image

Here is my deno.json:

    "tasks": {
        "client:start": "deno run -A --node-modules-dir=auto npm:vite",
        "server:start": "deno run -A --node-modules-dir --watch server/main.ts",
        "dev": "deno task client:start & deno task server:start"
    },
    "imports": {
        "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.2",
        "@std/assert": "jsr:@std/assert@1",
        "@tanstack/react-query": "npm:@tanstack/react-query@^5.64.1",
        "hono": "npm:hono@^4.6.16",
        "@types/react": "npm:@types/react@^19.0.6",
        "@vitejs/plugin-react": "npm:@vitejs/plugin-react@^4.3.4",
        "autoprefixer": "npm:autoprefixer@^10.4.20",
        "postcss": "npm:postcss@^8.4.49",
        "react": "npm:react@^19.0.0",
        "react-dom": "npm:react-dom@^19.0.0",
        "tailwindcss": "npm:tailwindcss@^3.4.17",
        "vite": "npm:vite@^6.0.7"
    },
    "types": ["types.d.ts", "vite/client"],
    "compilerOptions": {
        "types": ["react", "react-dom", "@types/react"],
        "lib": ["dom", "dom.iterable", "deno.ns"],
        "jsx": "react-jsx",
        "jsxImportSource": "react",
        "jsxImportSourceTypes": "@types/react"
    },
    "fmt":{
        "useTabs": true,
        "lineWidth": 120,
        "indentWidth": 4,
        "semiColons": true,
        "singleQuote": true,
        "include": ["client", "server"],
        "exclude": ["client/.vite"]
    }
}

Again, sorry if this is not due to the Deno project itself, or if I have a misconfiguration.

@marvinhagemeister marvinhagemeister added bug Something isn't working correctly lsp related to the language server labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly lsp related to the language server
Projects
None yet
Development

No branches or pull requests

2 participants