0

For the following line of code in App.vue

import TestComponent from '@/mytest/components/TestComponent.vue'

Vscode, specifically the vetur plugin, gives the error cannot find module @/mytest/components/TestComponent.vue

I checked my tsconfig.json file and my alias is correct set up as follows:

 "paths": {
      "@/*": [
        "src/*"
      ]
    },

the path to my component is: src/mytest/components/TestComponent.vue

The code compiles and runs just fine, it's Vscode giving me these errors.

How can I fix this?

1 Answer 1

1

Did you paste that code verbatim from your code? If so,

import TestComponent from '@/mytest/components/TestComponent.vue` <---

Your last single quote is a back quote.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.