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

I am currently working on this issue. For the solution, I need to install this 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.

@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!

Why are you making a second topic when you asked the same question here for the same issue? Caleb is one of the core dev team and you marked his answer as the solution.

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!

1 Like

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