Unable to make mac on windows
See original GitHub issuePreflight Checklist
- 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 a bug that matches the one I want to file, without success.
Issue Details
- Electron Forge Version:
- 6.0.0-beta.54
- Electron Version:
- v11.2.0
- Operating System:
- Microsoft Windows 10 Home 10.0.18363 N/A Build 18363
- Last Known Working Electron Forge version::
Expected Behavior
I’m trying to compile a simple electron App for a macOS target.
Actual Behavior
Compilation fails everytime. Error message indicates that it’s about an unauthorized access to path, but elevating terminal privilege to admin doesn’t seem to fix it at all.
To Reproduce
I’m using a default folder created with npx create-electron-app exercent
. I just added a command in my package.json file to compile directly for macOS platform :
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"make-mac": "electron-forge make --platform darwin",
"publish": "electron-forge publish",
"lint": "echo \"No linting configured\""
}
Additional Information
PS C:\Users\thiba\OneDrive\Documents\GeneralProjects\ElectronFakaround\exercent> npm run make-mac
> exercent@1.0.0 make-mac C:\Users\thiba\OneDrive\Documents\GeneralProjects\ElectronFakaround\exercent
> electron-forge make --platform darwin
√ Checking your system
√ Resolving Forge Config
We need to package your application before we can make it
Downloading electron-v11.2.0-darwin-x64.zip: [===============================] 100% ETA: 0.0 seconds
√ Preparing to Package Application for arch: x64
√ Preparing native dependencies
√ Packaging Application
Making for the following targets: zip
× Making for target: zip - On platform: darwin - For arch: x64
An unhandled error has occurred inside Forge:
An error occured while making for target: zip
Command failed: powershell.exe -nologo -noprofile -command & { param([String]$myInPath, [String]$myOutPath); Add-Type -A "System.IO.Compression.FileSystem"; [IO.Compression.ZipFile]::CreateFromDirectory($myInPath, $myOutPath); exit !$? } -myInPath "C:\Users\thiba\OneDrive\Documents\GeneralProjects\ElectronFakaround\exercent\out\exercent-darwin-x64\exercent.app" -myOutPath "C:\Users\thiba\OneDrive\Documents\GeneralProjects\ElectronFakaround\exercent\out\make\zip\darwin\x64\exercent-darwin-x64-1.0.0.zip"
Exception calling "CreateFromDirectory" with "2" argument(s): "Access to the path 'C:\Users\thiba\One
Drive\Documents\GeneralProjects\ElectronFakaround\exercent\out\exercent-darwin-x64\exercent.app\Conte
nts\Frameworks\Electron Framework.framework\Helpers' is denied."
At line:1 char:99
+ ... ileSystem"; [IO.Compression.ZipFile]::CreateFromDirectory($myInPath, ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : UnauthorizedAccessException
Error: Command failed: powershell.exe -nologo -noprofile -command & { param([String]$myInPath, [String]$myOutPath); Add-Type -A "System.IO.Compression.FileSystem"; [IO.Compression.ZipFile]::CreateFromDirectory($myInPath, $myOutPath); exit !$? } -myInPath "C:\Users\thiba\OneDrive\Documents\GeneralProjects\ElectronFakaround\exercent\out\exercent-darwin-x64\exercent.app" -myOutPath "C:\Users\thiba\OneDrive\Documents\GeneralProjects\ElectronFakaround\exercent\out\make\zip\darwin\x64\exercent-darwin-x64-1.0.0.zip"
Exception calling "CreateFromDirectory" with "2" argument(s): "Access to the path 'C:\Users\thiba\One
Drive\Documents\GeneralProjects\ElectronFakaround\exercent\out\exercent-darwin-x64\exercent.app\Conte
nts\Frameworks\Electron Framework.framework\Helpers' is denied."
At line:1 char:99
+ ... ileSystem"; [IO.Compression.ZipFile]::CreateFromDirectory($myInPath, ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : UnauthorizedAccessException
at ChildProcess.exithandler (child_process.js:295:12)
at ChildProcess.emit (events.js:223:5)
at ChildProcess.EventEmitter.emit (domain.js:475:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! exercent@1.0.0 make-mac: `electron-forge make --platform darwin`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the exercent@1.0.0 make-mac script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\thiba\AppData\Roaming\npm-cache\_logs\2021-01-14T10_51_27_390Z-debug.log
My package.json file :
{
"name": "exercent",
"productName": "Exercent",
"version": "0.0.1",
"description": "Exercent App",
"main": "src/index.js",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"make-mac": "electron-forge make --platform darwin",
"publish": "electron-forge publish",
"lint": "echo \"No linting configured\""
},
"keywords": [
"exercent",
"app",
"medical",
"adapted",
"jQuery",
"firebase",
"realtime database"
],
"author": {
"name": "Thibaud Marazano",
"email": "thibaud.marazano@gmail.com"
},
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {
"icon": "./src/icons/win/exercent_icon.ico"
},
"makers": [{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "exercent"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
]
}
},
"dependencies": {
"electron-squirrel-startup": "^1.0.0"
},
"devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.54",
"@electron-forge/maker-deb": "^6.0.0-beta.54",
"@electron-forge/maker-rpm": "^6.0.0-beta.54",
"@electron-forge/maker-squirrel": "^6.0.0-beta.54",
"@electron-forge/maker-zip": "^6.0.0-beta.54",
"electron": "11.2.0"
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (1 by maintainers)
Top Results From Across the Web
If you can't connect Mac and Windows computers
If you can't connect Mac and Windows computers, make sure both computers are on the same network and the network connection is working....
Read more >Unable to make mac on windows · Issue #2129 · electron/forge
Failed at the exercent@1.0.0 make-mac script. npm ERR! This is probably not a problem with npm. There is likely additional logging output ...
Read more >still can't get Windows 7 to see Mac on home network
still can't get Windows 7 to see Mac on home network · Go to Apple Menu>System Preferences · Select Users and Groups ...
Read more >How to Fix the "macOS Could Not Be Installed on Your ...
1. Restart Your Mac and Retry the Installation · 2. Set Your Mac to the Correct Date and Time · 3. Create Enough...
Read more >Cant see MacBook in Windows Network - Ask Different
When I click on Network on the PC, the MacBook doesn't show up. It has done previously. Sometimes the Windows computer shows in...
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
i managed to circumvent this issue by inlining my forge config back into the package.json
I see. No way around it then. Thanks