-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Native dependencies are not built when using yarn workspaces in 24.0.0-alpha.1 #7212
Comments
Hmmm I had a feeling the alpha version incorporating electron-rebuild would have a few issues arise. It worked with some of my local projects, but they're more simple in configuration. |
Would you mind generating an electron-quick-start monorepo project utilizing a yarn workspace such that I can repro this with? |
Can you try this patch? Curious if it'll do the trick
|
Thanks for your response! Here is the project using yarn workspaces https://github.com/gzdunek/electron-quick-start-monorepo. When you run $ electron-builder install-app-deps
• electron-builder version=24.0.0-alpha.1
• executing electron-rebuild appDir=/Users/grzegorz/code/electron-quick-start-monorepo/packages/electron-app arch=arm64
✨ Done in 0.60s. but is should be: $ electron-builder install-app-deps
• electron-builder version=24.0.0-alpha.1
• executing electron-rebuild appDir=/Users/grzegorz/code/electron-quick-start-monorepo/packages/electron-app arch=arm64
CXX(target) Release/obj.target/pty/src/unix/pty.o
SOLINK_MODULE(target) Release/pty.node
✨ Done in 1.39s. Let me know if you need anything else. |
Thanks for the sample repo! Was able to get it working locally. Please try v24.0.0-alpha.2 |
Thanks, |
Project structure: monorepo (yarn workspaces).
It seems that after migrating to
electron-rebuild
the native dependencies are no longer rebuilt.electron-builder install-app-deps
only looks for modules innode_modules
of the workspace, but of course it doesn't find any (because they are kept in the rootnode_modules
).CLI command
electron-rebuild
handles this situation by providingprojectRootPath
torebuild()
. If this option is not passed, the search for modules stops at the directory where the apppackage.json
is located.It would be great if
electron-builder
could populate this field using a function similar togetProjectRootPath()
.As a workaround,
nohoist
option can be used in yarn workspaces to prevent some dependencies from being hoisted to the project's root.The text was updated successfully, but these errors were encountered: