rustwasm / book

The Rust and WebAssembly Book
https://rustwasm.github.io/docs/book/
MIT License
1.75k stars 211 forks source link

4.2::Putting it into a Web Page::npm init wasm app www -> unexpected result #174

Open BikiniBottomsVeryOwn opened 5 years ago

BikiniBottomsVeryOwn commented 5 years ago

"www" subdirectory is not created after | npm init wasmp app www | command. How do I fix this?

fitzgen commented 5 years ago

Is your npm up to date?

Is there any error output?

Can you include more info?

sturdevant commented 5 years ago

I think I ran into the same issue when I was going through the tutorial also (see #169 under pt. 2). If it is what I suspect, then I think there's a command that you're supposed to run that wasn't stated explicitly. What worked for me was running this command:

cargo generate --git https://github.com/rustwasm/create-wasm-app

from the wasm-game-of-life directory, giving it www at the prompt, and then running npm init wasm-app www (also from the wasm-game-of-life directory). I should mention I'm not involved w/ this project though, so I can't say for sure if that's what the tutorial was hinting at or not, maybe @fitzgen can confirm?

fitzgen commented 5 years ago

The npm init wasm-app comamnd is the command that should clone that repo, not cargo generate.

Looking at the title again, I see that it says "wasm app" and not "wasm-app", and I suspect this is probably the issue.

3kyro commented 5 years ago

Had the same problem with a new installation of Ubuntu 19.10. Make sure that you install the latest version of Node, I find it easier to follow the steps here

carrascomj commented 4 years ago

Same issue with Ubuntu 18.04.4 and Node version 8.10.0. Upgrading to node 12x solved the problem as said before. Maybe, should it be mentioned in the book setup?