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

Style assignment causes language server to crash on repeat #5242

Open
moritz-baecker-integra opened this issue Mar 3, 2025 · 1 comment
Open
Labels
good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first 🔩 p2-edge-case upstream: volar

Comments

@moritz-baecker-integra
Copy link

moritz-baecker-integra commented Mar 3, 2025

Vue - Official extension or vue-tsc version

2.2.8

VSCode version

1.97.2

Vue version

3.15.13

TypeScript version

5.7.3

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
    Memory: 12.58 GB / 31.71 GB
  Binaries:
    Node: 22.13.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 11.1.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.1.1 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (131.0.2903.146)
    Internet Explorer: 11.0.22621.3527

package.json dependencies

"peerDependencies": {
    "vue": "^3.5.12",
    "vuetify": "^3.7.1"
  },
  "devDependencies": {
    "@cypress/code-coverage": "^3.13.10",
    "@cypress/vue": "^6.0.2",
    "@eslint/js": "^9.18.0",
    "@rushstack/eslint-patch": "^1.10.5",
    "@types/jest": "^29.5.14",
    "@types/node": "^22.10.7",
    "@vitejs/plugin-vue": "^5.2.1",
    "@vitest/coverage-istanbul": "^2.1.8",
    "@vue/eslint-config-prettier": "^10.2.0",
    "@vue/eslint-config-typescript": "^14.3.0",
    "@vue/test-utils": "^2.4.6",
    "allure-commandline": "^2.32.0",
    "allure-cypress": "^3.0.9",
    "autoprefixer": "^10.4.20",
    "cross-env": "^7.0.3",
    "cypress": "^13.17.0",
    "cypress-real-events": "^1.13.0",
    "eslint": "^9.18.0",
    "eslint-plugin-vue": "^9.32.0",
    "junit-report-merger": "^7.0.0",
    "make-dir": "^5.0.0",
    "make-dir-cli": "^4.0.0",
    "mocha-junit-reporter": "^2.2.1",
    "postcss": "^8.5.1",
    "prettier": "^3.4.2",
    "rimraf": "^6.0.1",
    "sass": "^1.83.4",
    "sonarqube-scanner": "^4.2.6",
    "tailwindcss": "^3.4.17",
    "typescript": "^5.7.3",
    "typescript-eslint": "^8.20.0",
    "vite": "^6.0.7",
    "vite-plugin-dts": "^4.5.0",
    "vite-plugin-istanbul": "^6.0.2",
    "vite-tsconfig-paths": "^5.1.4",
    "vitest": "^2.1.8",
    "vue": "^3.5.13",
    "vue-tsc": "^2.2.0",
    "vuetify": "^3.7.6"
  },
  "dependencies": {
    "@vueuse/core": "^12.7.0",
    "vite-plugin-vuetify": "^2.0.4",
    "vue-router": "^4.5.0"
  },

Steps to reproduce

<template>
  <div
    style="{
    width: 
  }"
  ></div>
</template>

Just copy the code above into a new component.
When typing anything after "width:" the server crashes each time.
Notice that the assignment is wrong. The ":"-Symbol is missing in front of the style attribute.

TypeError: Cannot read properties of undefined (reading 'type') at OZ (c:\Users\a\.vscode\extensions\vue.volar-2.2.8\dist\server.js:75:36515) at ese (c:\Users\a\.vscode\extensions\vue.volar-2.2.8\dist\server.js:99:15427) at r (c:\Users\a\.vscode\extensions\vue.volar-2.2.8\dist\server.js:99:17669) at async g (c:\Users\a\.vscode\extensions\vue.volar-2.2.8\dist\server.js:37:47437) at async Object.getCompletionItems (c:\Users\a\.vscode\extensions\vue.volar-2.2.8\dist\server.js:37:48241) at async c:\Users\a\.vscode\extensions\vue.volar-2.2.8\dist\server.js:66:25823 at async Immediate.<anonymous> (c:\Users\a\.vscode\extensions\vue.volar-2.2.8\dist\server.js:66:34395)

What is expected?

Show an error for the invalid object assignment syntax, but don't let the server crash.

What is actually happening?

The server is crashing repeadietly once you type anything behind "width:"

Link to minimal reproduction

No response

Any additional comments?

No response

@KazariEX KazariEX added good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first 🔩 p2-edge-case and removed pending triage labels Mar 3, 2025
@KazariEX
Copy link
Member

KazariEX commented Mar 3, 2025

The error is from volar-service-emmet:

<style>
.foo { { w } }
</style>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first 🔩 p2-edge-case upstream: volar
Projects
None yet
Development

No branches or pull requests

2 participants