cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.6k stars 673 forks source link

BUG: os error 193 #2308

Closed Alex1607 closed 1 year ago

Alex1607 commented 1 year ago

What version of Wrangler are you using?

2.4.4

What operating system are you using?

Windows

Describe the Bug

Hey, I just upgraded to wrangler2 and I am getting this error while trying to do npx wrangler dev

    Finished release [optimized] target(s) in 0.16s
[WARN]: :-) origin crate has no README
[INFO]: Installing wasm-bindgen...
[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 0.96s
[INFO]: :-) Your wasm pkg is ready to publish at C:\Users\Alexander\IdeaProjects\cf-worker-linkshortener\build.
Error: %1 ist keine zulässige Win32-Anwendung. (os error 193)

X [ERROR] Command failed with exit code 1: cargo install -q worker-build --version 0.0.7 && worker-build --release

Error: %1 ist keine zulässige Win32-Anwendung translated says: Error %1 is not valid Win32-Application

Oh and the same project works fine when I use WSL.

Alex1607 commented 1 year ago

Issue solved using this solution: https://github.com/cloudflare/workers-rs/issues/222#issuecomment-1314353798 I also created a PR to fix this for other Windows users: https://github.com/cloudflare/workers-sdk/pull/2727