"Cannot read property 'succeed' of undefined" occurs when packaging darwin targets on windows host
See original GitHub issue- I have read the contribution documentation for this project.
- I agree to follow the code of conduct that this project follows, as appropriate.
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
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
- Windows10(x64)
- Node: 6.11.3
- npm: 5.4.2
- electron-forge: 4.0.2
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.
set DEBUG=electron-forge:* & electron-forge make -p darwin --target=zip
WARNING: DEBUG environment variable detected. Progress indicators will be sent over electron-forge:lifecycle
electron-forge:lifecycle Process Started: Checking your system +0ms
electron-forge:lifecycle Process Succeeded: Checking your system +973ms
electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected. Progress indicators will be sent over electron-forge:lifecycle
electron-forge:lifecycle Process Started: Resolving Forge Config +0ms
electron-forge:project-resolver searching for project in: C:\Users\ico\Documents\works\developers-stop-watch +0ms
electron-forge:project-resolver electron-forge compatible package.json found in C:\Users\ico\Documents\works\developers-stop-watch\package.json +9ms
electron-forge:lifecycle Process Succeeded: Resolving Forge Config +27ms
electron-forge:require-search searching [ '../makers/darwin/zip.js',
'../makers/generic/zip.js',
'electron-forge-maker-zip',
'zip',
'C:\\Users\\ico\\Documents\\works\\developers-stop-watch\\zip',
'C:\\Users\\ico\\Documents\\works\\developers-stop-watch\\node_modules\\zip',
'C:\\Users\\ico\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\makers\\darwin\\zip.js',
'C:\\Users\\ico\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\makers\\generic\\zip.js',
'C:\\Users\\ico\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\electron-forge-maker-zip',
'C:\\Users\\ico\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\zip',
'C:\\Users\\ico\\Documents\\works\\developers-stop-watch\\zip',
'C:\\Users\\ico\\Documents\\works\\developers-stop-watch\\node_modules\\zip',
'C:\\Users\\ico\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\makers\\darwin\\zip.js',
'C:\\Users\\ico\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\makers\\generic\\zip.js',
'C:\\Users\\ico\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\node_modules\\electron-forge-maker-zip',
'C:\\Users\\ico\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\node_modules\\zip',
'C:\\Users\\ico\\Documents\\works\\developers-stop-watch\\zip',
'C:\\Users\\ico\\Documents\\works\\developers-stop-watch\\node_modules\\zip' ] relative to C:\Users\ico\AppData\Roaming\npm\node_modules\electron-forge\dist\api +0ms
electron-forge:require-search testing ../makers/darwin/zip.js +13ms
electron-forge:require-search testing ../makers/generic/zip.js +22ms
We need to package your application before we can make it
electron-forge:lifecycle Process Started: Preparing to Package Application for arch: x64 +63ms
electron-forge:project-resolver searching for project in: C:\Users\ico\Documents\works\developers-stop-watch +90ms
electron-forge:project-resolver electron-forge compatible package.json found in C:\Users\ico\Documents\works\developers-stop-watch\package.json +21ms
electron-forge:hook could not find hook: generateAssets +0ms
electron-forge:hook could not find hook: prePackage +3ms
electron-forge:packager packaging with options { asar: false,
overwrite: true,
afterCopy: [ [Function], [Function], [Function], [Function] ],
afterExtract: [],
dir: 'C:\\Users\\ico\\Documents\\works\\developers-stop-watch',
arch: 'x64',
platform: 'darwin',
out: 'C:\\Users\\ico\\Documents\\works\\developers-stop-watch\\out',
electronVersion: '1.7.6',
quiet: true } +0ms
electron-forge:hook could not find hook: postPackage +368ms
An unhandled rejection has occurred inside Forge:
Cannot read property 'succeed' of undefined
TypeError: Cannot read property 'succeed' of undefined
at _callee5$ (C:\Users\ico\AppData\Roaming\npm\node_modules\electron-forge\dist\api\package.js:388:28)
at tryCatch (C:\Users\ico\AppData\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:65:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\ico\AppData\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:299:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Users\ico\AppData\Roaming\npm\node_modules\electron-forge\node_modules\regenerator-runtime\runtime.js:117:21)
at GeneratorFunctionPrototype.tryCatcher (C:\Users\ico\AppData\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\util.js:16:23)
at PromiseSpawn._promiseFulfilled (C:\Users\ico\AppData\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\generators.js:97:49)
at Async._drainQueue (C:\Users\ico\AppData\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:138:12)
at Async._drainQueues (C:\Users\ico\AppData\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues (C:\Users\ico\AppData\Roaming\npm\node_modules\electron-forge\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
What command line arguments are you passing?
electron-forge make -p darwin --target=zip
What does your config.forge
data in package.json
look like?
"config": {
"forge": {
"make_targets": {
"win32": [
"zip"
],
"darwin": [
"zip"
],
"linux": [
"deb",
"rpm"
]
},
"electronPackagerConfig": {},
"electronWinstallerConfig": {
"name": ""
},
"electronInstallerDebian": {},
"electronInstallerRedhat": {},
"github_repository": {
"owner": "",
"name": ""
},
"windowsStoreConfig": {
"packageName": ""
}
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
"Cannot read property 'succeed' of undefined" occurs ... - GitHub
When I execute the make for Mac(darwin), "Cannot read property 'succeed' of undefined" occurred. Environment. Windows10(x64); Node: 6.11.3; npm: ...
Read more >Cannot Read Property of Undefined in JavaScript - Rollbar
It occurs when a property is read or a function is called on an undefined variable.
Read more >usecontext cannot read properties of undefined - You.com | The ...
I think the issue here is that since the selectedTrack is loaded asynchronously, when it is accessed from the context, it is undefined...
Read more >Uncaught TypeError: Cannot read property of null - iDiallo
All this means is that you are trying to access a property of an object that is undefined. These usually happens when we...
Read more >Docker Compose release notes
Resolved environment variables case-insensitively on Windows. Fixes compose#9431. Fixed compose up so dependency containers aren't stopped when a stop signal is ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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!