[Solved] Vue3 Import Cutomize Components Error: Cannot find module ‘xxx‘ or its corresponding type declarations

1. Error reporting

1. Error reported in idea

2. Scaffold compilation error

2. Cause

There is no problem with the statements. Why do you report errors? Because the address of Import is wrong.

Solution:

import TheHeader from '../components/the-header.vue';
import TheFooter from "../components/the-footer.vue";
import TheSider from "../components/the-sider.vue";

3. The effects are as follows:

Perfect solution.

Similar Posts: