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

Plugin installed from JSR using Deno causes intellisense to fail #1124

Closed
emmalineautumn opened this issue Jan 19, 2025 · 1 comment · Fixed by #1191
Closed

Plugin installed from JSR using Deno causes intellisense to fail #1124

emmalineautumn opened this issue Jan 19, 2025 · 1 comment · Fixed by #1191

Comments

@emmalineautumn
Copy link

emmalineautumn commented Jan 19, 2025

What version of VS Code are you using?

v1.96.4

What version of Tailwind CSS IntelliSense are you using?

v0.12.18

What version of Tailwind CSS are you using?

v2.0.4

What package manager are you using?

Deno

What operating system are you using?

Linux (Debian Bookworm), Windows

Tailwind config

import {BearMetalUI} from "@bearmetal/ui"

/** @type {import('tailwindcss').Config} */
export default {
  content: [
    "index.html",
    "./src/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [BearMetalUI()],
}

VS Code settings

{
    "git.enableSmartCommit": true,
    "editor.tabSize": 2,
    "git.autofetch": true,
    "workbench.colorTheme": "Bearded Theme Stained Purple",
    "[typescript]": {
        "editor.defaultFormatter": "denoland.vscode-deno"
    },
    "editor.minimap.enabled": false,
    "explorer.confirmDragAndDrop": false,
    "explorer.confirmDelete": false,
    "editor.formatOnSave": true,
    "editor.formatOnPaste": true,
    "[json]": {
        "editor.defaultFormatter": "denoland.vscode-deno"
    },
    "[typescriptreact]": {
        "editor.defaultFormatter": "denoland.vscode-deno"
    },
    "workbench.startupEditor": "none",
    "smartsemicolon.autoLineChange": false
}

Reproduction URL

Repro Repo

Describe your issue

The intellisense server crashes due to being unable to load a plugin that has been installed from jsr.io using Deno. Relevant extension output:

Error: Can't resolve '@bearmetal/ui' in '/home/emma/local_repos/speedtest/client'
    at p (/home/emma/.vscode/extensions/bradlc.vscode-tailwindcss-0.12.18/dist/tailwindServer.js:130:7155)
    at /home/emma/.vscode/extensions/bradlc.vscode-tailwindcss-0.12.18/dist/tailwindServer.js:131:713
    at /home/emma/.vscode/extensions/bradlc.vscode-tailwindcss-0.12.18/dist/tailwindServer.js:134:405
    at eval (eval at create (/home/emma/.vscode/extensions/bradlc.vscode-tailwindcss-0.12.18/dist/tailwindServer.js:5:78), <anonymous>:15:1)
    at /home/emma/.vscode/extensions/bradlc.vscode-tailwindcss-0.12.18/dist/tailwindServer.js:134:405
    at eval (eval at create (/home/emma/.vscode/extensions/bradlc.vscode-tailwindcss-0.12.18/dist/tailwindServer.js:5:78), <anonymous>:27:1)
    at /home/emma/.vscode/extensions/bradlc.vscode-tailwindcss-0.12.18/dist/tailwindServer.js:134:7916
    at /home/emma/.vscode/extensions/bradlc.vscode-tailwindcss-0.12.18/dist/tailwindServer.js:134:405
    at eval (eval at create (/home/emma/.vscode/extensions/bradlc.vscode-tailwindcss-0.12.18/dist/tailwindServer.js:5:78), <anonymous>:15:1)
    at /home/emma/.vscode/extensions/bradlc.vscode-tailwindcss-0.12.18/dist/tailwindServer.js:134:405

At the very least I would expect it to fail gracefully so that the base classes are available via intellisense

@thecrypticace
Copy link
Contributor

thecrypticace commented Jan 20, 2025

Supporting something like this is probably not possible at the moment (or even at all) given that VSCode itself does not use Deno. The main problem here is that @bearmetal/ui doesn't live in node_modules but Deno puts it somewhere else on the filesystem.

As for the fallback behavior, I'll have to look into that. The built-in / fallback version can't even load the config so it doesn't necessarily know that it's a valid project to begin with.

I'll leave this open for me to think over some

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

Successfully merging a pull request may close this issue.

2 participants