Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

code: 404 #3

Closed
weekdaycare opened this issue Oct 5, 2022 · 8 comments
Closed

code: 404 #3

weekdaycare opened this issue Oct 5, 2022 · 8 comments

Comments

@weekdaycare
Copy link

您好,我在部署完成后碰到了下面的状况,请问有什么解决方法呢?

image

下面是kkapi的截图

image

本人才疏学浅,恳请大佬帮忙解答

@kkfive
Copy link
Owner

kkfive commented Oct 5, 2022

地址呢?

@weekdaycare
Copy link
Author

@kkfive
Copy link
Owner

kkfive commented Oct 6, 2022

@weekdaycare
Copy link
Author

环境变量应该是没有问题的

image

@kkfive
Copy link
Owner

kkfive commented Oct 6, 2022

重新部署下试试呢?

因为我看到你提供的地址中 配置文件中不包含环境变量的配置

@weekdaycare
Copy link
Author

重新部署了似乎并没有起作用

image

@kkfive
Copy link
Owner

kkfive commented Oct 7, 2022

https://kkadmin-open-nine.vercel.app/_app.config.js?v=2.8.0-1664959750510

这个配置文件的里都没有你设置的那些环境变量

@weekdaycare
Copy link
Author

问题已解决

我刚刚去您的kk-admin网站看了一下

https://kkadmin-open.vercel.app/_app.config.js?v=2.8.0-1664959750510 和我的似乎一样,均是这个代码

window.__PRODUCTION____APP__CONF__={"VITE_GLOB_API_URL_PREFIX":"/api"};Object.freeze(window.__PRODUCTION____APP__CONF__);Object.defineProperty(window,"__PRODUCTION____APP__CONF__",{configurable:false,writable:false,});

然后我看vercel目前是支持node16的,于是我就想着能否跳过action直接在vercel上编译?

于是我把vercel部署分支改为 master ,然后将vercel的部署命令改为了下面的值

image

再次重新部署,部署成功后访问就没有问题了

image

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

No branches or pull requests

2 participants