Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial issue section 4.4 #150

Open
brianharnish opened this issue Jun 5, 2020 · 1 comment
Open

Tutorial issue section 4.4 #150

brianharnish opened this issue Jun 5, 2020 · 1 comment

Comments

@brianharnish
Copy link

Rust newbie here,
Just following the tutorial and I've reached midway through section 4.4 where I've run into a weird issue. I try building the project and running npm run start, that's when I got the error message:
ERROR in ./index.js 1:20
Module parse failed: Unexpected token (1:20)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

import { Universe } as wasm from "wasm-game-of-life";
| const pre = document.getElementById("game-of-life-canvas");
| const universe = Universe.new();
@ ./bootstrap.js 4:0-20

How would I fix this issue?

@ChayimFriedman2
Copy link

Omit the as wasm:

import { Universe } from "wasm-game-of-life";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants