<p><ahref="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=E8JMYD2LQ8MMA&lc=GB&item_name=Joplin+Development&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted"><imgsrc="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/badges/Donate-PayPal-green.svg"alt="Donate using PayPal"></a><ahref="https://github.com/sponsors/laurent22/"><imgsrc="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/badges/GitHub-Badge.svg"alt="Sponsor on GitHub"></a><ahref="https://www.patreon.com/joplin"><imgsrc="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/badges/Patreon-Badge.svg"alt="Become a patron"></a><ahref="https://joplinapp.org/donate/#donations"><imgsrc="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/badges/Donate-IBAN.svg"alt="Donate using IBAN"></a></p>
<p>If <code>yarn dist</code> fails, it may need administrative rights.</p>
<p>If you get an <code>error MSB8020: The build tools for v140 cannot be found.</code> try to run with a different toolset version, eg <code>npm install --toolset=v141</code> (See <ahref="https://github.com/mapbox/node-sqlite3/issues/1124">here</a> for more info). You may also try to install <code>npm --vs2015 install --global windows-build-tools</code> (the --vs2015 flag is to get toolkit "v140", which is what is used by default).</p>
<p>There are various errors that can occur from an improper build environment (such as MSBUILD: error MSB3428). It is recommended to install <code>windows-build-tools</code> with the command <code>npm install --global windows-build-tools</code> (elevation required) and then using these two commands to set the environmental variables to the proper values:</p>
set "PATH=C:\Program Files\nodejs;%PATH%"
</code></pre>
<h2>On Linux and macOS<aname="on-linux-and-macos"href="#on-linux-and-macos"class="heading-anchor">🔗</a></h2>
<p>If there's an error <code>while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory</code>, run <code>sudo apt-get install libgconf-2-4</code></p>
<p>If you get a node-gyp related error, you might need to manually install it: <code>npm install -g node-gyp</code>.</p>
<p>If you get unexpected <code>npm</code> dependency errors on a fresh git pull, try <code>npm run clean</code></p>
<p>If <code>npm i</code> gives you a fatal error like the following:</p>
<pre><code>node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@5.0.1 and node@14.15.4 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
/bin/sh: 1: python: not found
</code></pre>
<p>Try <code>sudo apt install python</code> (or the <code>apt</code> equivalent for your operating system) and then run <code>npm i</code> again.</p>
<p>If you get the error <code>libtool: unrecognized option '-static'</code>, follow the instructions <ahref="https://stackoverflow.com/a/38552393/561309">in this post</a> to use the correct libtool version.</p>
<p>The application window doesn't open or is white</p>
</blockquote>
<p>This is an indication that there's an early initialisation error. Try this:</p>
<ul>
<li>In ElectronAppWrapper, set <code>debugEarlyBugs</code> to <code>true</code>. This will force the window to show up and should open the console next to it, which should display any error.</li>
<li>In more rare cases, an already open instance of Joplin can create strange low-level bugs that will display no error but will result in this white window. A non-dev instance of Joplin, or a dev instance that wasn't properly closed might cause this. So make sure you close everything and try again. Perhaps even other Electron apps running (Skype, Slack, etc.) could cause this?</li>
<li>Also try to delete node_modules and rebuild.</li>
<li>If all else fails, switch your computer off and on again, to make sure you start clean.</li>
</ul>
<blockquote>
<p>How to work on the app from Windows?</p>
</blockquote>
<p><strong>You should not use WSL at all</strong> because this is a GUI app that lives outside of WSL, and the WSL layer can cause all kind of very hard to debug issues. It can also lock files in node_modules that cannot be unlocked when the app crashes. (You need to restart your computer.) Likewise, don't run the TypeScript watch command from WSL.</p>
<p>So everything should be done from a Windows Command prompt or Windows PowerShell running as Administrator. All build and start commands are designed to work cross-platform, including on Windows.</p>
<p>If there is an error <code>/joplin/packages/app-mobile/ios/Pods/Target Support Files/Pods-Joplin/Pods-Joplin.debug.xcconfig: unable to open file (in target "Joplin" in project "Joplin") (in target 'Joplin' from project 'Joplin')</code> run the following commands:</p>