workers-rs
workers-rs copied to clipboard
[BUG] cargo workspace project, how to config worker-build? worker-build error, but missing info can't resolve.
Is there an existing issue for this?
- [x] I have searched the existing issues
What version of workers-rs are you using?
0.7
What version of wrangler are you using?
4.45.3
Describe the bug
cargo project struct
root
|
|--|--worker
|
|--wrangler.toml
cmd
>worker-build ./worker
[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
[INFO]: Optimizing wasm binaries with `wasm-opt`...
[INFO]: Optional fields missing from Cargo.toml: 'description', 'repository', and 'license'. These are not necessary, but recommended
[INFO]: :-)Done in 15.90s
[INFO]: :-) Your wasm pkg is ready to publish at next_sight_cloudflare_worker\build.
Error: The system cannot locate the specified path. (os error 3)
what's error is this? The system cannot locate the specified path.
wrangler.toml
name = "next_sight_cloudflare_worker"
main = "build/worker/shim.mjs"
compatibility_date = "2024-10-06"
send_metrics = false
[dev]
ip = "0.0.0.0"
port = 8787
local_protocol = "http"
[build]
command = "worker-build --dev"
[observability]
enabled = true
Steps To Reproduce
No response
You need to run worker-build from within the folder being built - cd worker && worker-build.
so there is no solution?
I think we should improve the error here, instead of bailing with a bad error like this though.