Closed icoxfog417 closed 6 years ago
Perhaps try installing the Forge from the pull request https://github.com/electron-userland/electron-forge/pull/325 ? You can do so by:
git clone https://github.com/electron-userland/electron-forge
cd electron-forge
and make a note of this pathgit checkout use-cross-zip
npm install
npm run build
electron-forge
version in your project's package.json
devDependencies
to the path from step 2npm run package -- --platform=darwin --target=zip
Same here, even without specifying the arch.
.\node_modules\.bin\electron-forge package --platform=darwin
√ Checking your system
| Preparing to Package Application for arch: x64
An unhandled rejection has occurred inside Forge:
Cannot read property 'succeed' of undefined
TypeError: Cannot read property 'succeed' of undefined
at D:\Perso\retropie-arcade-manager\node_modules\electron-forge\dist\api\package.js:315:21
at Generator.next (<anonymous>)
at Generator.tryCatcher (D:\Perso\retropie-arcade-manager\node_modules\bluebird\js\release\util.js:16:23)
at PromiseSpawn._promiseFulfilled (D:\Perso\retropie-arcade-manager\node_modules\bluebird\js\release\generators.js:97:49)
at Async._drainQueue (D:\Perso\retropie-arcade-manager\node_modules\bluebird\js\release\async.js:138:12)
at Async._drainQueues (D:\Perso\retropie-arcade-manager\node_modules\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues [as _onImmediate] (D:\Perso\retropie-arcade-manager\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:763:18)
at tryOnImmediate (timers.js:734:5)
at processImmediate (timers.js:716:5)
I have just added the electron-forge package like 5 minutes ago with npm i -D electron-forge
.
package.json: (why is electron-compile in dependencies and not devDependencies?)
"dependencies": {
"csv": "^2.0.0",
"electron-compile": "^6.4.2",
"electron-squirrel-startup": "^1.0.0",
"fs-extra": "^5.0.0"
},
"devDependencies": {
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"electron-forge": "^5.1.2",
"electron-prebuilt-compile": "1.8.4",
"gulp": "^3.9.1"
},
"config": {
"forge": {
"make_targets": {
"win32": [
"squirrel"
],
"darwin": [
"zip"
],
"linux": [
"deb",
"rpm"
]
},
"electronPackagerConfig": {
"packageManager": "npm"
},
"electronWinstallerConfig": {
"name": "Retropie Arcade Manager"
},
"electronInstallerDebian": {},
"electronInstallerRedhat": {},
"github_repository": {
"owner": "",
"name": ""
},
"windowsStoreConfig": {
"packageName": "",
"name": "Retropie Arcade Manager"
}
}
}
Not specifying a platform (so it builds a Windows package) works fine. --platform=linux
also works fine.
@cosmo0 can you please try the instructions in https://github.com/electron-userland/electron-forge/issues/331#issuecomment-331773002 and see if that works for you?
Still no luck :(
package.json:
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make"
},
"dependencies": {
"csv": "^2.0.0",
"fs-extra": "^5.0.0",
"electron-compile": "^6.4.2",
"electron-squirrel-startup": "^1.0.0"
},
"devDependencies": {
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"electron-forge": "D:/Perso/electron-forge",
"electron-prebuilt-compile": "1.8.4"
},
"config": {
"forge": {
"make_targets": {
"win32": [
"zip"
],
"darwin": [
"zip"
],
"linux": [
"deb",
"rpm"
]
}
}
}
Console output:
>> npm run make -- --platform=darwin --target=zip
> retropie-arcade-manager@1.0.0 make D:\Perso\retropie-arcade-manager
> electron-forge make "--platform=darwin" "--target=zip"
√ Checking your system
√ Resolving Forge Config
We need to package your application before we can make it
\ Preparing to Package Application for arch: x64
An unhandled rejection has occurred inside Forge:
Cannot read property 'succeed' of undefined
TypeError: Cannot read property 'succeed' of undefined
at D:\Perso\electron-forge\dist\api\package.js:315:21
at Generator.next (<anonymous>)
at Generator.tryCatcher (D:\Perso\electron-forge\node_modules\bluebird\js\release\util.js:16:23)
at PromiseSpawn._promiseFulfilled (D:\Perso\electron-forge\node_modules\bluebird\js\release\generators.js:97:49)
at Async._drainQueue (D:\Perso\electron-forge\node_modules\bluebird\js\release\async.js:138:12)
at Async._drainQueues (D:\Perso\electron-forge\node_modules\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues [as _onImmediate] (D:\Perso\electron-forge\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:763:18)
at tryOnImmediate (timers.js:734:5)
at processImmediate (timers.js:716:5)
log:
0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files (x86)\nodejs\node.exe', 1 verbose cli 'C:\Users\xxx\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'make', 1 verbose cli '--', 1 verbose cli '--platform=darwin', 1 verbose cli '--target=zip' ] 2 info using npm@5.8.0 3 info using node@v9.8.0 4 verbose run-script [ 'premake', 'make', 'postmake' ] 5 info lifecycle retropie-arcade-manager@1.0.0~premake: retropie-arcade-manager@1.0.0 6 info lifecycle retropie-arcade-manager@1.0.0~make: retropie-arcade-manager@1.0.0 7 verbose lifecycle retropie-arcade-manager@1.0.0~make: unsafe-perm in lifecycle true 8 verbose lifecycle retropie-arcade-manager@1.0.0~make: PATH: C:\Users\xxx\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\Perso\retropie-arcade-manager\node_modules.bin;C:\Program Files\ConEmu\ConEmu\Scripts;C:\Program Files\ConEmu;C:\Program Files\ConEmu\ConEmu;C:\windows;C:\windows\system32;C:\windows\system32\inetsrv;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files\TortoiseSVN\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;D:\Mongodb\bin;C:\Program Files (x86)\nodejs;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\Python27;C:\Program Files (x86)\nodejs\;C:\Program Files\TortoiseGit\bin;C:\Users\xxx\AppData\Local\scoop\shims;C:\Program Files\Git\usr\bin;.bin;C:\Program Files\Mercurial\;D:\DEV\tools\sonarqube\scanner\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\xxx\AppData\Local\Programs\Fiddler;C:\Users\xxx\AppData\Roaming\npm 9 verbose lifecycle retropie-arcade-manager@1.0.0~make: CWD: D:\Perso\retropie-arcade-manager 10 silly lifecycle retropie-arcade-manager@1.0.0~make: Args: [ '/d /s /c', 10 silly lifecycle 'electron-forge make "--platform=darwin" "--target=zip"' ] 11 silly lifecycle retropie-arcade-manager@1.0.0~make: Returned: code: 1 signal: null 12 info lifecycle retropie-arcade-manager@1.0.0~make: Failed to exec make script 13 verbose stack Error: retropie-arcade-manager@1.0.0 make:
electron-forge make "--platform=darwin" "--target=zip"
13 verbose stack Exit status 1 13 verbose stack at EventEmitter.(C:\Users\xxx\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:283:16) 13 verbose stack at EventEmitter.emit (events.js:180:13) 13 verbose stack at ChildProcess. (C:\Users\xxx\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:180:13) 13 verbose stack at maybeClose (internal/child_process.js:936:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5) 14 verbose pkgid retropie-arcade-manager@1.0.0 15 verbose cwd D:\Perso\retropie-arcade-manager 16 verbose Windows_NT 6.3.9600 17 verbose argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Users\xxx\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "make" "--" "--platform=darwin" "--target=zip" 18 verbose node v9.8.0 19 verbose npm v5.8.0 20 error code ELIFECYCLE 21 error errno 1 22 error retropie-arcade-manager@1.0.0 make: electron-forge make "--platform=darwin" "--target=zip"
22 error Exit status 1 23 error Failed at the retropie-arcade-manager@1.0.0 make script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]
I'm going to close this out given #475 and #434. Also this is almost certainly handle in V6 or typescript would be complaining to us 😄
Spent an hour on that error. Pretty sure it happens because electron-packager need create Symlinks for macos package and on windows you need admin rights for that. Run from cmd as admin worked for me. Error message from electron-packager not shown because electron-forge run electron-packager in "quiet mode".
Related issues - https://github.com/electron-userland/electron-packager/issues/71 https://github.com/electron-userland/electron-packager/issues/164
related code in electron-packager https://github.com/electron-userland/electron-packager/blob/v13.1.1/index.js#L35 https://github.com/electron-userland/electron-packager/blob/v13.1.1/index.js#L57
Maybe it worth to make same symlink checking...
@rguryanov Thank you soooo much!! Helped me a lot!
I could find out the #67 but it is so old version.
Please describe your issue:
When I execute the make for Mac(darwin), "Cannot read property 'succeed' of undefined" occurred.
Environment
*Console output when you run
electron-forge
with the environment variable `DEBUG=electron-forge:`. (Instructions on how to do so here). Please include the stack trace if one exists.**What command line arguments are you passing?
What does your
config.forge
data inpackage.json
look like?