Internal server error: Failed to resolve import "@/mixins/JeecgListMixin" from "src\views\specialty\SpecialtyList.vue". Does the file exist?
时间: 2023-12-15 12:03:38 浏览: 229
这个错误提示可能是因为在 `SpecialtyList.vue` 文件中使用了 `@/mixins/JeecgListMixin` 的导入方式,但是 Vue CLI 默认没有配置 `@` 别名,需要手动添加。
你可以在项目根目录下的 `vue.config.js` 文件中添加以下代码:
```javascript
module.exports = {
chainWebpack: config => {
config.resolve.alias.set('@', resolve('src'))
}
}
```
这样就可以在项目中使用 `@` 别名代替 `src` 目录了。如果还有问题,可以提供更多代码或者错误信息。
相关问题
Internal server error: Failed to resolve import "@/views/errors/404.vue" from "src\router\index.ts". Does the file exist?
This error message is indicating that there is an issue with the import statement in the "src\router\index.ts" file. The import statement is trying to import a file located at "@/views/errors/404.vue", but the file cannot be found or resolved.
To resolve this issue, you should check the file path and make sure that the file actually exists in the specified location. You should also check if the file path is correct and consistent with the file structure of your project.
If the file exists and the path is correct, you may need to check your project settings and make sure that the path alias (represented by the "@" symbol) is correctly set up. This can be done in the "vue.config.js" file or in the "tsconfig.json" file depending on your project setup.
Once you have resolved the issue with the import statement, the internal server error should be resolved and you should be able to run your project without any issues.
[vite] Internal server error: Failed to resolve import "@nutui/nutui/dist/packages/searchba/style" from "src\views\frontPage\components\WorkCard.vue". Does the file exist?
这个错误提示的意思是在你的项目中,路径为 `@nutui/nutui/dist/packages/searchba/style` 的文件不存在。这可能是因为你的依赖包中缺少了这个文件,或者你的路径有误。
你可以先检查一下这个依赖包是否正确安装,或者尝试更新一下依赖包。如果还是不行,你可以检查一下路径是否正确,或者尝试使用绝对路径来引入这个文件。
阅读全文