Internal server error: Failed to resolve import "@/mixins/JeecgListMixin" from "src\views\specialty\SpecialtyList.vue". Does the file exist?
时间: 2023-12-15 11:03:38 浏览: 61
这个错误提示可能是因为在 `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.
Internal server error: Failed to resolve import "./store" from "src\main.js". Does the file exist?
As an AI language model, I don't have access to your project files or system, so it's difficult for me to give a specific solution to your problem. However, here are some general troubleshooting steps you can try:
1. Make sure the file exists: Check if the file "./store.js" exists in the "src" directory of your project. If it doesn't exist, create the file and add the necessary code.
2. Check the import statement: Make sure the import statement in "src/main.js" is correct and matches the file path and name of the "./store.js" file. Also, make sure the file extension is correct (e.g. .js, .ts, etc.).
3. Check the file permissions: Ensure that the file permission settings allow the "src/main.js" file to access the "./store.js" file.
4. Restart the server: Sometimes, restarting the server can resolve the issue. Try restarting the server and see if the error persists.
5. Check for typos: Double-check for any typos in the file path or import statement.
If none of these steps resolve the issue, you may need to seek further help from your development team or community.
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)