HomePhabricator
Diffusion Comm 821cd1916522

[keyserver] Make opaque-ke-napi build on Windows

Description

[keyserver] Make opaque-ke-napi build on Windows

Summary:
We want to be able to build the desktop app on Windows but currently opaque-ke-napi fails.
As far as I've investigated the issue happens because when you run napi build it searches for node_modules/@napi-rs/cli/index.js. It can't find it on windows because of some symlink weirdness
(we are using yarn workspaces so we are running this in node_modules/native folder that's symlinked to the real folder).

This diff uses the nohoist option to keep @napi-rs/cli inside native/node-modules (otherwise it's hoisted to the root node_modules). The biggest problem with this approach is that if we ever use @napi-rs/cli in some other package it wouldn't be shared.

Test Plan:

  • yarn cleaninstall on macOS laptop works
  • CI on phab works
  • yarn cleaninstall on Windows laptop and on GitHub Windows Runner (in a forked repo) works

Reviewers: varun, atul, tomek, ashoat

Reviewed By: ashoat

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D6143

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Dec 29 2022, 5:56 AM
Reviewer
ashoat
Differential Revision
D6143: [keyserver] Make opaque-ke-napi build on Windows
Parents
rCOMM1d332ea54def: [native] Make native build on Windows
Branches
Unknown
Tags
Unknown

Event Timeline