book icon indicating copy to clipboard operation
book copied to clipboard

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

Open BikiniBottomsVeryOwn opened this issue 6 years ago • 5 comments

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

BikiniBottomsVeryOwn avatar Jun 04 '19 19:06 BikiniBottomsVeryOwn

Is your npm up to date?

Is there any error output?

Can you include more info?

fitzgen avatar Jun 05 '19 17:06 fitzgen

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?

sturdevant avatar Jun 06 '19 04:06 sturdevant

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.

fitzgen avatar Jun 06 '19 15:06 fitzgen

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

3kyro avatar Nov 08 '19 20:11 3kyro

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?

carrascomj avatar Apr 29 '20 13:04 carrascomj