Skip to content

Instantly share code, notes, and snippets.

@caprica
Last active May 11, 2022 14:04
Show Gist options
  • Save caprica/25850e43afaaa29c8d8658d6e519e9f7 to your computer and use it in GitHub Desktop.
Save caprica/25850e43afaaa29c8d8658d6e519e9f7 to your computer and use it in GitHub Desktop.
vue.js, Typescript, VS Code and Volar
Creating a brand new vue.js application with Typescript was working, but there were errors reported by VS Code when trying to import modules, it would complain that the module or type definitions could not be found.
- make sure obsolete vue.js extensions like Vetur are no longer installed
- install Vue Language Features (Volar) and nothing else
- in the extensions tab in VS Code, type "@builtin typescript"
- choose TypeScript and JavaScript Language Features
- in the editor content pane, find the gear icon to enable/disable the extension
- choose Disable (workspace)
- restart VS Code
Note that restarting VS Code might not be enough, if errors persist then open the project directory again.
You know it works when you see a notification message saying "Take Over Mode enabled".
Credit here: https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment