Hi @fitzgen, I’ll open an issue, but will post here as well (but only this time).
The git error is gone by now (even though I don’t remember doing anything that fixed it).
But there’s still the second error, which can be reproduced by running this command:
docker run -it --rm -p 8080:8080 elifarley/docker-dev-env:wasm-rust ./setup-example.sh
This will load a Docker image based on Debian with Node 10 installed. On top of this base image, my Dockerfile also sets up Rust like this:
curl https://sh.rustup.rs -sSf | sh -s -- -y
. $HOME/.cargo/env
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh && \
cargo install cargo-generate
The docker run
command (see start of this message) will launch a container based on this image and execute something like this:
echo 'wasm-game-of-life' | cargo generate --git https://github.com/rustwasm/wasm-pack-template
cd wasm-game-of-life && \
wasm-pack build && \
npm init wasm-app www && \
(cd www && python -m SimpleHTTPServer 8080)
You can see the source code for this (Dockerfile and setup-example.sh) at https://github.com/elifarley/docker-dev-env/tree/master/wasm-rust
After that, you can point your browser to http://localhost:8080/ and this error message should appear on the web console:
bootstrap.js:5 Error importing `index.js`: TypeError: Failed to resolve module specifier "hello-wasm-pack". Relative references must start with either "/", "./", or "../".