# Where to install a new dependency that will be used by all the platform apps?

**URL:** <https://discourse.joplinapp.org/t/where-to-install-a-new-dependency-that-will-be-used-by-all-the-platform-apps/7234>\
**Category:** Development\
**Created:** [22 March 2020 17:37 UTC](https://discourse.joplinapp.org/t/where-to-install-a-new-dependency-that-will-be-used-by-all-the-platform-apps/7234 "2020-03-22T17:37:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jyuvaraj03](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/jyuvaraj03/32/2657_2.png) [@jyuvaraj03](https://discourse.joplinapp.org/u/jyuvaraj03)\
**Post date:** [22 March 2020 17:37 UTC](https://discourse.joplinapp.org/t/where-to-install-a-new-dependency-that-will-be-used-by-all-the-platform-apps/7234/1 "2020-03-22T17:37:39Z")

</div>

I am currently working on this [issue](https://github.com/laurent22/joplin/issues/2773). For the solution, I need to install [this](https://github.com/atom/node-keytar) node package using `npm install keytar`.

During development, I only had to use the desktop client. So, I manually installed the package using `npm install keytar` followed by `npm install` inside the ElectronClient directory. But, when the PR gets deployed the code will run across all the clients. I tried installing the package from only the root of the project. But when I opened up the desktop client after this, it threw me an error saying: `Uncaught Exception: Error: Module did not self-register.`

So, where (and how) should I install the node package so that it gets installed across all the clients.

---

<div class="post-metadata">

**Author:** ![jyuvaraj03](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/jyuvaraj03/32/2657_2.png) [@jyuvaraj03](https://discourse.joplinapp.org/u/jyuvaraj03)\
**Post date:** [23 March 2020 03:04 UTC](https://discourse.joplinapp.org/t/where-to-install-a-new-dependency-that-will-be-used-by-all-the-platform-apps/7234/2 "2020-03-23T03:04:41Z")

</div>

@PackElend @bedwardly-down can you or any other mentor help me with this? I’m trying to submit a PR, but I’m stuck at this step. Please help so that I can submit it. Thanks!

---

<div class="post-metadata">

**Author:** ![bedwardly-down](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/bedwardly-down/32/3236_2.png) [@bedwardly-down](https://discourse.joplinapp.org/u/bedwardly-down)\
**Post date:** [23 March 2020 04:01 UTC](https://discourse.joplinapp.org/t/where-to-install-a-new-dependency-that-will-be-used-by-all-the-platform-apps/7234/3 "2020-03-23T04:01:54Z")

</div>

Why are you making a second topic when you asked the same question [here](https://discourse.joplinapp.org/t/installing-and-using-a-new-dependency-throws-an-error-error-module-did-not-self-register/7193/3) for the same issue? Caleb is one of the core dev team and you marked his answer as the solution.

---

<div class="post-metadata">

**Author:** ![jyuvaraj03](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/jyuvaraj03/32/2657_2.png) [@jyuvaraj03](https://discourse.joplinapp.org/u/jyuvaraj03)\
**Post date:** [23 March 2020 04:57 UTC](https://discourse.joplinapp.org/t/where-to-install-a-new-dependency-that-will-be-used-by-all-the-platform-apps/7234/4 "2020-03-23T04:57:27Z")

</div>

The question I asked there was to setup the development environment which was only for the ElectronClient. The solution given by Caleb worked for that case during development. But when my PR gets deployed the dependency will have to installed across all the clients.

I created this new topic to know if there was a right way to install the dependency across all the clients at the same time.

Sorry if I didn’t make it clear!

---

<div class="post-metadata">

**Author:** ![CalebJohn](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/calebjohn/32/356_2.png) [@CalebJohn](https://discourse.joplinapp.org/u/CalebJohn)\
**Post date:** [23 March 2020 05:33 UTC](https://discourse.joplinapp.org/t/where-to-install-a-new-dependency-that-will-be-used-by-all-the-platform-apps/7234/5 "2020-03-23T05:33:53Z")

</div>

@jyuvaraj03 You should add the dependency in ElectronClient/package.json, CliClient/package.json, and ReactNativeClient/package.json.
