From 06b723db6e7b37545145487bf244e41500455c97 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Thu, 11 Nov 2021 14:05:07 -0500 Subject: [PATCH] add note about telling olm how to find wasm file --- javascript/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/javascript/README.md b/javascript/README.md index bdf0224..853f612 100644 --- a/javascript/README.md +++ b/javascript/README.md @@ -5,6 +5,11 @@ Note: before using any of the olm functions, you must call `Olm.init()`, and wait for the promise to resolve, otherwise you will get errors like: `Uncaught TypeError: Olm.Account is not a constructor` +If you get errors about failure to compile the wasm file, it is likely that Olm +is not locating the wasm file properly. You can tell Olm where the wasm file +is by passing a `locateFile` parameter to `Olm.init()`, for example: +`Olm.init({locateFile: () => pathToWasmFile})`. + Example: var alice = new Olm.Account();