rust
rust copied to clipboard
`bundled_api` macro fails on Windows machine, still works on linux, remote building on vercel works on both
I received this error when I try to build locally on my Windows machine with the new api bundling macro:
error: custom attribute panicked
--> api/main.rs:16:1
|
16 | #[bundled_api]
| ^^^^^^^^^^^^^^
|
= help: message: `"api\\cron\\characters_db"` is not a valid identifier
error[E0425]: cannot find value `handler` in this scope
--> api/main.rs:9:9
|
9 | run(handler).await
| ^^^^^^^ not found in this scope
Even though this error didn't show up in my linux machine with the same code, I've also tried cargo clean
but no luck.
If I commit to git and let vercel builds for me, then it still builds without any issue
this is my
vercel.json
{
"outputDirectory": "public",
"functions": {
"api/main.rs": {
"runtime": "[email protected]"
}
},
"crons": [
{
"path": "/api/cron/write_characters_db",
"schedule": "0 1 * * *"
}
]
}
Do you happen to have a reproduction repo and toolchain configuration? I'm not super familiar with Windows and I'm unable to build the crates at all due to singal-hook
issues.