LoginSignup
5
0

More than 1 year has passed since last update.

Veturで"Type annotations can only be used in TypeScript files."が出る場合

Posted at

TypeScript化したVue.jsプロジェクトに過去のVue.jsプロジェクトからコンポーネントを移植してTS化していた際、VeturがType annotations can only be used in TypeScript files.とエラーを出して型定義をさせてくれませんでした。

原因

凡ミス中の凡ミスですが、原因は<script>タグに<script lang="ts">と記載していないことでした。

参考

Couldn't resolve 'types' can only be used in a .ts file. Vetur(8010) #1347

5
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
0