Problems with Electron build env

I moved my development env to a new machine and followed the instructins inBUILD.md.

When I run run.sh, I get the following error in the console:

Uncaught Error: The module '/Users/tessus/data/work/joplin/ElectronClient/app/node_modules/sqlite3/lib/binding/electron-v4.0-darwin-x64/node_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 69. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:160:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:722)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:160:31)
    at Module.load (internal/modules/cjs/loader.js:602)
    at tryModuleLoad (internal/modules/cjs/loader.js:541)
    at Function.Module._load (internal/modules/cjs/loader.js:533)
    at Module.require (internal/modules/cjs/loader.js:640)
    at require (internal/modules/cjs/helpers.js:20)
    at Object.<anonymous> (/Users/tessus/data/work/joplin/ElectronClient/app/node_modules/sqlite3/lib/sqlite3.js:4)
    at Object.<anonymous> (/Users/tessus/data/work/joplin/ElectronClient/app/node_modules/sqlite3/lib/sqlite3.js:190)

I ran npm rebuild --build-from-source sqlite3 and npm rebuild --build-from-source electron, but I still receive the same error.

You might need to run “yarn dist” again, or directly “./node_modules/.bin/electron-rebuild”. The project now uses electron-rebuild which is much better to ensure that we get the right version of sqlite for the current version of Electron.

./node_modules/.bin/electron-rebuild did the trick. Great, thank you.

Please note that I never ran yarn dist on the new machine, because I do not want to create a dist package, but only test my local changes before opening a PR.

Maybe we should add this info the the BUILD.md.