-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hoisting Electron with Yarn workspaces breaks Electron #4070
Comments
This also breaks other tools like React Native. I'm guessing that hoisting the dependencies to the root seems to break the scripts being called to run them.
|
Also breaks Meteor - it does not look at packages in parent node_modules. When I asked them to support that, they answered:
If there was a way to indicate that a certain directory should have all it's package.json packages available in it's local node_modules, for example through a flag in package.json (even if these were just symlinks to the parent node_modules), this would work. Currently it works if we symlink all packages from the root node_modules to our Meteor app node_modules, however if I try to install a new package from within the Meteor folder, yarn deletes all packages in the Meteor node_modules folder, breaking it again. |
support for check nohoist in Workspaces. |
I've defined my mono-repo root's package.json as below and it seems to work...
so far no compilation errors and apps run both on the electron and react native side. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When working in a monorepo using Yarn workspaces and the dependencies for an electron app are hoisted to root, when you run
lerna bootstrap
the electron app is no longer operable from the scripts in package.json"start": "electron ."
Error
Directory
lerna.json
root package.json
Desktop/Electron app package.json
If the current behavior is a bug, please provide the steps to reproduce.
Sample repo & instructions
What is the expected behavior?
Running
yarn start
should trigger electron app to launch.Please mention your node.js, yarn and operating system version.
Node.js -v : 8.2.1
yarn -v : 0.27.5_1
OS -v : macOS Sierra v10.12.6
The text was updated successfully, but these errors were encountered: