reactjs - Vercel Build Failure - Stack Overflow

Out of the blue our React application started failing the build with this error:Error: 'vercelo

Out of the blue our React application started failing the build with this error:

Error: '/vercel/output/functions/api/FOLDER_NAME/ANOTHER_FOLDER_NAME/FUNCTION_NAME.func/.vc-config.json' already exists

I see this warning before Vercel checks the functions

@vercel/build is currently force building /api files itself, with no way to disable it. In order to avoid double compilation, you should temporarily rename /api to /_api while using this plugin. /_api functions are compiled under .vercel/output/functions/api/*.func as if they were in /api.

So I've tried to change to _api and it worked, the issue is my app stops working, no even the authentication works with _api, so I'm in a dead end. We use Vite and Vercel CLI to run locally.

Out of the blue our React application started failing the build with this error:

Error: '/vercel/output/functions/api/FOLDER_NAME/ANOTHER_FOLDER_NAME/FUNCTION_NAME.func/.vc-config.json' already exists

I see this warning before Vercel checks the functions

@vercel/build is currently force building /api files itself, with no way to disable it. In order to avoid double compilation, you should temporarily rename /api to /_api while using this plugin. /_api functions are compiled under .vercel/output/functions/api/*.func as if they were in /api.

So I've tried to change to _api and it worked, the issue is my app stops working, no even the authentication works with _api, so I'm in a dead end. We use Vite and Vercel CLI to run locally.

Share Improve this question asked Mar 21 at 1:45 Diego FilastroDiego Filastro 114 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

To whoever face this issue in the future, in our case it was caused by a plugin called 'vite-vercel-plugin' which configs how Vite projects integrate with Vercel's Serverless functions and one of the things it does is to manually generate an '.vercel/outputs' folder, which was causing the conflict with the one generated automatically by Vercel, in addition of that, we've noticed that this plugin started updating their dependencies about 2/3 weeks ago, which is around the time we started facing these issues, although it might be just coincidence, we've solved our issue by removing this plugin from our project.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744375874a4571184.html

相关推荐

  • reactjs - Vercel Build Failure - Stack Overflow

    Out of the blue our React application started failing the build with this error:Error: 'vercelo

    7天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信