marcoroth / stimulus-lsp

Intelligent Stimulus tooling for Visual Studio Code and Neovim
https://hotwire.io/ecosystem/tooling/stimulus-lsp
MIT License
201 stars 10 forks source link

[question] Element with ID #326

Open richjdsmith opened 3 days ago

richjdsmith commented 3 days ago

I am not sure where else to turn. I am getting this error code in VScode:

Element with id /home/richsmith/workspace/retiredmortgages/app/javascript/controllers/countchars_controller.js-countchars-true is already registered

I am at a loss as to what this means and what's causing it.

The controller itself is super simple:

import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
  static targets = ["name", "counter"]
  connect() {
    console.log("Countchars controller connected")
  }

  countCharacters(event) {
    let characters = this.nameTarget.value.length;
    this.counterTarget.innerText = characters;
  }
}

But no matter what I do, this error lives on. Any suggestions? place to turn?

richjdsmith commented 3 days ago

It appears not to be related with any one controller. Possibly an importmaps issue?