Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复 v2.7.1 版本,在build时报找不到error.ts的问题 #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MuGuiLin
Copy link

@MuGuiLin MuGuiLin commented Sep 7, 2021

修复 v2.7.1 版本,在build时报找不到error.ts的问题

报错信息如下:
[load-fallback] Could not load E:\vben-admin-thin-next\src/api/demo/error (imported by src\views\sys\error-log\index.vue?vue&type=script&setup=true&lang.ts): ENOENT: no such file or directory, open 'E:\vben-admin-thin-next\src\api\demo\error' error during build: Error: Could not load E:\vben-admin-thin-next\src/api/demo/error (imported by src\views\sys\error-log\index.vue?vue&type=script&setup=true&lang.ts): ENOENT: no such file or directory, open 'E:\vben-admin-thin-next\src\api\demo\error' error Command failed with exit code 1.

解决办法:
在src/api/demo/目录中添加error.ts文件,文件内容如下:
`import { defHttp } from '/@/utils/http/axios';

enum Api {
// The address does not exist
Error = '/error',
}

/**

export const fireErrorApi = () => defHttp.get({ url: Api.Error });
`

@JYDwayne
Copy link

错误日志列表页面 点击触发ajax错误 可根据自身开发需求去掉相关功能即可

@qingmang
Copy link

目前2.7.2 还是这个问题 build 搞了半天

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants