Vue 3 default project vetur cannot find module

Viewed 1710

When I install a Vue 3 Typescript project with vue create hello-world I get the following error in the Home.vue

Cannot find module '@/components/HelloWorld.vue' or its corresponding type declarations.Vetur(2307)

on line

import HelloWorld from "@/components/HelloWorld.vue"; // @ is an alias to /src

Edit: I noticed that it is happening because I am working in a workspace with 3 other folders. If I open the folder seperately I get no error.

0 Answers
Related