rustwasm / book

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

No `www` dir created by the `npm init wasm-app www` command in the tutorial. #94

Closed AaronM04 closed 6 years ago

AaronM04 commented 6 years ago

Describe the bug No www dir created by the npm init wasm-app www command in the tutorial.

To Reproduce Steps to reproduce the behavior:

  1. cargo generate --git https://github.com/rustwasm/wasm-pack-template
  2. Enter wasm-game-of-life for the project name
  3. cd wasm-game-of-life
  4. wasm-pack init
  5. npm init wasm-app www
  6. Observe that there is no www directory created, contrary to what is said in https://rustwasm.github.io/book/game-of-life/hello-world.html#putting-it-into-a-web-page

Expected behavior I expected a www directory so that I could continue the tutorial.

fitzgen commented 6 years ago

Hi @AaronM04, thanks for filing an issue. Have you verified that your npm is up to date? https://rustwasm.github.io/book/game-of-life/setup.html#npm has instructions on doing that

AaronM04 commented 6 years ago

Not yet. I'll have to check in several hours. Do you know of versions that would exhibit this behavior?

On September 17, 2018 10:05:03 AM PDT, Nick Fitzgerald notifications@github.com wrote:

Hi @AaronM04, thanks for filing an issue. Have you verified that your npm is up to date? https://rustwasm.github.io/book/game-of-life/setup.html#npm has instructions on doing that

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/rustwasm/book/issues/94#issuecomment-422094215

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

fitzgen commented 6 years ago

Another person had a very similar issue, and updating their npm install fixed the problem. That's how we ended up including that snippet in the setup instructions :)

I'm on npm 6.2.0, and the www directory is correctly generated for me.

AaronM04 commented 6 years ago

I was on npm 5.6.0. Unfortunately Fedora won't let me upgrade npm any farther, so I made an Arch Linux VM and confirmed that the tutorial worked through npm run start with npm 6.4.1 (what you get when you install with pacman -Syu npm).

Do you know of an alternate way of making this www directory that would work with the npm that comes with Fedora?

And thanks for your help so far!

fitzgen commented 6 years ago

FWIW, I recommend using nvm to manage node/npm installs (similar to rustup). This should allow you to update to newer npm on fedora. https://github.com/creationix/nvm

You can also just clone https://github.com/rustwasm/create-wasm-app into www, which is what is happening under the hood.

Thanks again for filing an issue!