adopted-ember-addons / ember-electron

:zap: Build, test, compile and package desktop apps with Ember and Electron
https://ember-electron.js.org/
Other
805 stars 109 forks source link

ember-electron (v2 - beta 4) won't install on Windows 10 when Yarn is present #214

Closed hinti closed 7 years ago

hinti commented 7 years ago

Problem

ember-electron (beta 4) won't install on Windows 10 when Yarn is present.

Environment

ember-cli: 2.12.1 node: 6.10.1 os: win32 x64 yarn: 0.21.3

Steps to Reproduce

OK case - No yarn

ember new demoOK
cd demoOK
ember install ember-electron@v2.0.0-beta.4

NPM: Installed ember-electron@v2.0.0-beta.4
installing ember-electron
  create ember-electron\.compilerc
  create ember-electron\.eslintrc.js
  create ember-electron\main.js
  create testem-electron.js
  create tests\ember-electron\.eslintrc.js
  create tests\ember-electron\main.js
Project needs forge config
NPM: Installed devtron@^1.4.0
NPM: Installed electron-protocol-serve@^1.3.0
Installed electron build tools
Created ember-electron resource dirs
Extracted ember-electron forge config
Installed addon package.

ERROR case - Yarn installed

C:\Users\shi>yarn --version
0.21.3

ember new demoFail
cd demoFail
ember install ember-electron@v2.0.0-beta.4

Error: Failed to install modules: ["electron-compile"]

Error trace

Error: Failed to install modules: ["electron-compile"]

With output: yarn add v0.21.3
info No lockfile found.
[1/4] Resolving packages...
warning ember-cli-qunit > broccoli-babel-transpiler > babel-core > minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS
 issue
warning ember-electron > electron-forge > zip-folder > archiver > glob > minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegEx
p DoS issue
warning ember-electron > electron-forge > electron-windows-store > flatten-packages > wrench@1.5.9: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any oper
ations you were using wrench for. Thanks for all the usage over the years.
warning ember-electron > npmi > npm > request > node-uuid@1.4.8: Use uuid module instead
warning ember-electron > electron-forge > nugget > progress-stream > through2 > xtend > object-keys@0.4.0:
[2/4] Fetching packages...
warning electron-installer-debian@0.5.1: The platform "win32" is incompatible with this module.
info "electron-installer-debian@0.5.1" is an optional dependency and failed compatibility check. Excluding it from installation.
warning electron-installer-flatpak@0.4.1: The platform "win32" is incompatible with this module.
info "electron-installer-flatpak@0.4.1" is an optional dependency and failed compatibility check. Excluding it from installation.
warning electron-installer-redhat@0.4.0: The platform "win32" is incompatible with this module.
info "electron-installer-redhat@0.4.0" is an optional dependency and failed compatibility check. Excluding it from installation.
warning fsevents@1.1.1: The platform "win32" is incompatible with this module.
info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
warning appdmg@0.4.5: The platform "win32" is incompatible with this module.
info "appdmg@0.4.5" is an optional dependency and failed compatibility check. Excluding it from installation.
error macos-alias@0.2.11: The platform "win32" is incompatible with this module.
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

    at ChildProcess.<anonymous> (C:\Users\shi\Desktop\demoFail\node_modules\electron-forge\dist\util\install-dependencies.js:64:37)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at ChildProcess.cp.emit (C:\Users\shi\Desktop\demoFail\node_modules\cross-spawn\lib\enoent.js:40:29)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
anulman commented 7 years ago

Looks like macos-alias is being req'd via appdmg, which is an optionalDep of electron-installer-dmg, which is a dep on electron-forge.

This smells of a yarn bug, but may be patchable upstream. Can you try manually editing your node_modules/electron-forge/package.json to move electron-installer-dmg to optionalDeps?

If this resolves the issue, we can pursue a fix upstream in forge.

bendemboski commented 7 years ago

This is not fixable until this yarn fix is released. The fact that appdmg is a non-optional dependency of electron-installer-dmg means that no matter whether electron-installer-dmg or any of its parent dependencies are optional, if appdmg fails to install, yarn will fail the whole operation ☹️

hinti commented 7 years ago

@bendemboski - You're right. It works with yarn 0.23.0-20170405.1705

> yarn --version

0.23.0-20170405.1705

> ember install ember-electron@v2.0.0-beta.4

NPM: Installed ember-electron@v2.0.0-beta.4
installing ember-electron
  create ember-electron\.compilerc
  create ember-electron\.eslintrc.js
  create ember-electron\main.js
  create testem-electron.js
  create tests\ember-electron\.eslintrc.js
  create tests\ember-electron\main.js
Project needs forge config
NPM: Installed devtron@^1.4.0
NPM: Installed electron-protocol-serve@^1.3.0
Installed electron build tools
Created ember-electron resource dirs
Extracted ember-electron forge config
Installed addon package.

Closed b/c not an ember-electron bug