cloudflare/workers-rs

[BUG] The argument '--out-dir <OUT_DIR>' cannot be used multiple times” error in wasm-pack when specifying --out-dir for worker-build.

mm1995tk opened this issue · 1 comments

Is there an existing issue for this?

  • I have searched the existing issues

What version of workers-rs are you using?

0.3.0

What version of wrangler are you using?

3.34.2

Describe the bug

The argument '--out-dir <OUT_DIR>' cannot be used multiple times” error in wasm-pack when specifying --out-dir in worker-build.

It was caused by parse with duplicated options when the user specified the option specified in build_args.
here

Steps To Reproduce

worker-build -t bundler -d custom_dir
# error: the argument '--out-dir <OUT_DIR>' cannot be used multiple times

I have solved the problem and will close it.
When building with nix, worker-build is giving me
Error: Read-only file system (os error 30).
The purpose was to try to solve this problem by specifying a different directory.

After some research, I was able to resolve the error by specifying a dummy directory for $HOME, referring to the following link.

It is no longer necessary to specify --out-dir.