When working with electron-forge and yarn workspaces, I ran into an issue where forge was looking for an electron package in the package-local
node_modules/electron. This calls for using
nohoist, which will put all of the packages we specify into the local node_modules for that package and not hoist them into the root workspace package.json.
We also want every other package to be local for the
desktop package we're working on, because the electron-forge webpack integration I'm using also breaks for the same reason. We can
nohoist everything that
desktop depends on using
The workspace looks like this: