rustwasm/rust-webpack-template

Template fails when running `npm start`

nikgraf opened this issue · 4 comments

These are the steps I followed

mkdir my-app
cd my-app
npm init rust-webpack
npm install
npm start

The issue seems to be due spawning wasm-pack

➜  my-app git:(master) ✗ npm start     

> create-rust-webpack@0.1.3 start /Users/nikgraf/projects/webassembly-rust-course/my-app
> webpack-dev-server -d

ℹ️  Compiling your crate...

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: spawn wasm-pack ENOENT
    at _errnoException (util.js:992:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3

My node version v8.11.3 on OSX

xtuc commented

Do you have wasm-pack in your $PATH? it is up to date?

Nope, don't have wasm-pack in my $PATH.

➜  my-app git:(master) ✗ which wasm-pack
wasm-pack not found

ahhh ok, so wasm-pack needs to be installed beforehand. just talked to @xtuc and he will update the instructions