# Attempting to build on Windows

**URL:** <https://discourse.joplinapp.org/t/attempting-to-build-on-windows/22559>\
**Category:** Development\
**Created:** [22 December 2021 14:34 UTC](https://discourse.joplinapp.org/t/attempting-to-build-on-windows/22559 "2021-12-22T14:34:12Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![ken1kob](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/ken1kob/32/12648_2.png) [@ken1kob](https://discourse.joplinapp.org/u/ken1kob)\
**Post date:** [22 December 2021 17:03 UTC](https://discourse.joplinapp.org/t/attempting-to-build-on-windows/22559/12 "2021-12-22T17:03:39Z")

</div>

I followed the same path as @Daeraxa and got stuck.

```auto
Error: spawnSync yarn ENOENT

```

The cause is cmd.exe cannot execute `yarn`. Changing the shell or using `yarn.cmd` is needed.  
By rewriting app-desktop/tools/compileScripts.js as follows, I succeeded in the build.

```diff
- const result = spawnSync('yarn', ['run', 'babel', '--presets', 'react', '--out-file', jsPath, jsxPath]);
+ const result = spawnSync('yarn', ['run', 'babel', '--presets', 'react', '--out-file', jsPath, jsxPath], { shell: true });

```

---

_[View the full topic](https://discourse.joplinapp.org/t/attempting-to-build-on-windows/22559)._
