-
-
Notifications
You must be signed in to change notification settings - Fork 570
Error installing electron-forge in Linux with yarn: platform incompatible with module #136
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@soulchainer This is a known issue with |
@MarshallOfSound couldn't this be fixed by just changing electron-installer-dmg to be an |
@bendemboski I tried it, that doesn't fix the problem. |
It's because at the moment yarn fails loudly if dependencies of optionalDependencies fail. This is a problem on their end of things |
Yarn is an exceptionally poor fit for Electron apps, because any yarn.lock file you generate is going to be wrong for 2 out of 3 of your target operating systems |
My company is standardized on MacOS as our dev machines, and it speeds up development quite a bit to have a yarn.lock file. We can easily tell the CI machines running other OS's to ignore the lock file, losing the benefits there, but still realizing them in our dev cycles. I suspect that the statement "yarn is not a good choice for any project with optional dependencies" is not one that the yarn folks would want to just live with, no? |
I would hope so, but that issue that @MarshallOfSound referenced has been open for several months. Perhaps they consider Electron apps to be an edge case? |
Yeah, there's an old PR here that purported to fix the issue at some point. It was just closed a few hours ago, so I dropped a comment clarifying that it's definitely not fixed. Maybe some 👍 s or additional comments or something would help get it on somebody's radar? If not, maybe I'll try opening a new PR that's up-to-date with master and has that fix, or this other proposed fix. |
@bendemboski thanks for pushing forward on this. As someone who runs Linux as their primary dev environment, it's very much appreciated. |
Okay, hopefully yarnpkg/yarn#2811 or electron-userland/electron-installer-dmg#13 will land soon so this will stop being an issue! For the time being anybody that's hating life because of this could just check out and build my branch and run it locally (although it would be more of a pain to get it working in CI) |
This issue has been fixed, I confirmed it, yarnpkg/yarn#1435 is finally squashed in the latest 0.23.0 nightly :) |
🎉 can anyone confirm what happens to |
@kevingelion I think @paulcbetts commented somewhere (don't remember where, sorry) that the problem you mention is a big blocker in version controlling |
I was just trying to install
electron-forge
with yarn and it won't install, saying that "linux" platform is incompatible with the modulemacos-alias
.npm
installs correctly (doesn't even throws a warning aboutmacos-alias
).yarn global add electron-forge --prefix ~/.npm-global
Throws (without the
#
, of course, just for highlight the error part):Is this a problem of
electron-forge
withyarn
(like some configuration) or ayarn
specific one?The text was updated successfully, but these errors were encountered: