# XOD development setup

**URL:** <https://forum.xod.io/t/xod-development-setup/3958>\
**Category:** XOD Ideas & Discussions\
**Created:** [May 14, 2020, 3:12am UTC](https://forum.xod.io/t/xod-development-setup/3958 "2020-05-14T03:12:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![quinkennedy](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/quinkennedy/32/2347_2.png) [@quinkennedy](https://forum.xod.io/u/quinkennedy)\
**Post date:** [May 14, 2020, 3:12am UTC](https://forum.xod.io/t/xod-development-setup/3958/1 "2020-05-14T03:12:48Z")

</div>

I was hoping to address [the arduino-cli version](https://github.com/xodio/xod/issues/1896), but am having issues getting a XOD development environment set up completely. Is there a place that has thorough dev documentation? Covering things like setting up environment variables, 3rd party downloads, logging options, etc?

so far I have figured out:

- There was a very clear message about adding arduino-cli to the PATH or creating an environment variable for it, so I did that.
- I see you have nvm specified for v10
- I’m currently running into errors in my dev Electron app when I try to “Upload to Arduino…”, it says

> ERROR undefined does not have a method named “split”

ps: I’m on OSX

---

<div class="post-metadata">

**Author:** ![brusher\_ru](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/brusher_ru/32/12_2.png) [@brusher\_ru](https://forum.xod.io/u/brusher_ru)\
**Post date:** [May 14, 2020, 10:26am UTC](https://forum.xod.io/t/xod-development-setup/3958/2 "2020-05-14T10:26:34Z")

</div>

> I’m currently running into errors in my dev Electron app when I try to “Upload to Arduino…”, it says

Do you get this error right on the opening of the Upload to Arduino popup? At first sight, it looks like there is no `aruino-cli` found or it has another version. We are using an old alpha build version of `arduino-cli`: [http://downloads.arduino.cc/PR/arduino-cli/arduino-cli-25-PR91-osx.zip](http://downloads.arduino.cc/PR/arduino-cli/arduino-cli-25-PR91-osx.zip)  
We have to update it to the latest version, but so far it has not reached the hands.

Another way to provide `arduino-cli` to the desktop IDE is to copy the `arduino-cli` right inside `xod-client-electron` and rename it to just `arduino-cli` like on the screenshot:

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/6/6cd18e907cbb81370b1cc11d1a846833c08e29cd.png)

---

<div class="post-metadata">

**Author:** ![brusher\_ru](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/brusher_ru/32/12_2.png) [@brusher\_ru](https://forum.xod.io/u/brusher_ru)\
**Post date:** [May 14, 2020, 10:32am UTC](https://forum.xod.io/t/xod-development-setup/3958/3 "2020-05-14T10:32:31Z")

</div>

Try to download the one mentioned above and ensure that everything works.

Also, you can run tests for the `arduino-cli` JS wrapper with the same name. Run tests from the root of the repository: `yarn test --scope arduino-cli && yarn test-func --scope arduino-cli`. Do not forget to run `yarn && yarn build` before.

After that, if you want to update `arduino-cli` to the latest one, try to update it and run tests again. It might fail. Perhaps even with the same error. In this case you have to fix `arduino-cli` package. Then you can run tests and test uploading, updating indexes and etc manually.

If everything works fine, we’ll be happy if you make a pull request then 🙂

---

<div class="post-metadata">

**Author:** ![quinkennedy](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/quinkennedy/32/2347_2.png) [@quinkennedy](https://forum.xod.io/u/quinkennedy)\
**Post date:** [May 14, 2020, 3:12pm UTC](https://forum.xod.io/t/xod-development-setup/3958/4 "2020-05-14T15:12:39Z")

</div>

💡 That totally makes sense, that’s exactly what unit tests are for!

---

<div class="post-metadata">

**Author:** ![quinkennedy](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/quinkennedy/32/2347_2.png) [@quinkennedy](https://forum.xod.io/u/quinkennedy)\
**Post date:** [May 18, 2020, 6:47pm UTC](https://forum.xod.io/t/xod-development-setup/3958/5 "2020-05-18T18:47:20Z")

</div>

Is there a debugging/logging framework that you use, or have considered incorporating? Or a IDE you use for debugging/stepping?

such as:

- [https://www.npmjs.com/package/debug](https://www.npmjs.com/package/debug)
- [https://www.npmjs.com/package/winston](https://www.npmjs.com/package/winston)
