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

Not working on Yarn 3.5.0 with "@volar/vue-language-plugin-pug" plugin #2608

Closed
letavocado opened this issue Apr 14, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@letavocado
Copy link

Not working on Yarn 3.5.0 with "@volar/vue-language-plugin-pug" plugin. But works fine with npm.

tsconfig.json

{
  "extends": "./.nuxt/tsconfig.json",
  "vueCompilerOptions": {
    "plugins": [
      "@volar/vue-language-plugin-pug"
    ]
  }
}

Volar server stats output:

Load plugin failed /home/.../node_modules/@volar/vue-language-plugin-pug/out/index.js Error: Cannot find module '@volar/language-service'
Require stack:
- /home/.../node_modules/@volar-plugins/pug/out/pugDocument.js
- /home/.../node_modules/@volar-plugins/pug/out/languageService.js
- /home/.../node_modules/@volar/vue-language-plugin-pug/out/index.js
- /home/.../.vscode-oss/extensions/vue.volar-1.2.0-linux-x64/dist/node/server.js
- /home/.../.vscode-oss/extensions/vue.volar-1.2.0-linux-x64/server.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at c._load (node:electron/js2c/asar_bundle:5:13343)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/.../node_modules/@volar-plugins/pug/out/pugDocument.js:4:28)
    at Module._compile (node:internal/modules/cjs/loader:1118:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:829:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/.../node_modules/@volar-plugins/pug/out/pugDocument.js',
    '/home/.../node_modules/@volar-plugins/pug/out/languageService.js',
    '/home/.../node_modules/@volar/vue-language-plugin-pug/out/index.js',
    '/home/.../.vscode-oss/extensions/vue.volar-1.2.0-linux-x64/dist/node/server.js',
    '/home/.../.vscode-oss/extensions/vue.volar-1.2.0-linux-x64/server.js'
  ]

  ...
  
 TypeError: o is not a function
    at /home/.../.vscode-oss/extensions/vue.volar-1.2.0-linux-x64/dist/node/server.js:846:9951
    at Array.map (<anonymous>)
    at ewe (/home/.../.vscode-oss/extensions/vue.volar-1.2.0-linux-x64/dist/node/server.js:846:9944)
    at Object.rwe (/home/.../.vscode-oss/extensions/vue.volar-1.2.0-linux-x64/dist/node/server.js:846:20241)
    at Object.kIe (/home/.../.vscode-oss/extensions/vue.volar-1.2.0-linux-x64/dist/node/server.js:7320:3900)
    at Object.resolveConfig (/home/.../.vscode-oss/extensions/vue.volar-1.2.0-linux-x64/dist/node/server.js:7324:8994)
    at Object.d [as getLanguageService] (/home/.../.vscode-oss/extensions/vue.volar-1.2.0-linux-x64/dist/node/server.js:510:1933)
    at /home/.../.vscode-oss/extensions/vue.volar-1.2.0-linux-x64/dist/node/server.js:510:32874
    at Generator.next (<anonymous>)
    at a (/home/.../.vscode-oss/extensions/vue.volar-1.2.0-linux-x64/dist/node/server.js:510:24057)
[Error - 3:13:08 PM] The Vue Semantic Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.

}

If I delete "vueCompilerOptions" section everything works fine, but when <template lang="pug"> volar doesn't show errors, yarn with html works fine.

package.json devDeps

"devDependencies": {
   "nuxt": "3.0.0",
   "pug": "^3.0.2",
   "@volar/vue-language-plugin-pug": "^1.2.0",
   "typescript": "^5.0.3",
   "vite-plugin-pug": "^0.3.2",
   "vue-tsc": "^1.2.0"
}

✅ Used workspace typescript version
image

✅ built-in typescript is disabled for workspace

✅ ./node_modules/@volar-plugins/
image

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Apr 20, 2023
@letavocado
Copy link
Author

Awesome! Now everything works great! Thanks, @johnsoncodehk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants