I just try the hello world on my computer.
Project structure is

wasm-pack init is success

but wasm-pack pack . is faild

wasm-pack.log
Aug 31 10:21:31.981 INFO Running pack command...
Aug 31 10:21:31.982 INFO Path: Some(".")
Aug 31 10:21:31.982 INFO Packing up the npm package...
Aug 31 10:21:31.982 ERRO 系统找不到指定的文件。 (os error 2)
No error occurred
os: windows 10 x64 17746.1000
wasm-pack version: 0.4.2
rustc version: 1.30.0-nightly (02cb8f2a4 2018-08-29)
Thanks for the bug report!
@WangZishi I suspect that npm wasn't installed on your machine, could you paste the npm meta info here?
@fitzgen
anyway, pack cmd invokes npm directly https://github.com/rustwasm/wasm-pack/blob/89be40df2f478a19b9fdd38dafdc7792967560f2/src/npm.rs#L10-L18
maybe better to add a binary exsit_or_not checking as you did in test PR here?
That sounds good to me! We should probably always do that, just to get good error messages to users
@csmoe I do have npm and node installed on my machine.

ah @WangZishi what happens when you run wasm-pack pack (without the dot?). the dot shouldn't cause an issue but it may be...
@ashleygwilliams
and it has the same output.

what else can I help?
hrm. thanks so much for the response and sorry this is taking so long to figure out. @steveklabnik do you think you could try this locally?
I get
C:\Users\steve> wasm-pack pack
| 🎒 packed up your package!
this bug can be reproduced with Chinese-ver Windows7 in my virtualbox, comparing to stevelabnik's comment, I suspect that system locale is the one to be blamed.
this might help: https://github.com/rust-lang/rust/issues/42791
Unfortunately, this issue affects login, pack, and publish on Windows!
I verified that the cause suggested by @luotaoyeah is indeed occurring. Command places "npm" in quotes when calling it, which causes it to fail in Windows only.
The recommended solution is to call npm using cmd /c. I am working on a PR for this and have verified the cmd /c solution works. Unfortunately, it requires some OS-specific code -- but it seems unavoidable.
@danwilhelm are you on discord or IRC? feel free to reach out to me on either platfrom (i'm ag_dubs)
closed by #489! about to go out!
@WangZishi @csmoe I was not able to test my commit on Chinese-ver Windows! Could you possibly verify whether it is fixed in wasm-pack 0.6.0?
@danwilhelm thanks for the fix. I'll test then(my locale gussing maybe almost not the cause).
Most helpful comment
this might help: https://github.com/rust-lang/rust/issues/42791