You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree to follow the code of conduct that this project uses.
I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
6.4.2
Electron version
24.8.5
Operating system
Windows 11 22H2 (22621.2361)
Last known working Electron Forge version
6.4.2
Expected behavior
A successful output from electron-forge make --platform=win32 (using Squirrel).
Actual behavior
❯ npm run make
> [email protected] make
> env-cmd -f .env.production rm -rf .vite && electron-forge make --platform=win32
✔ Checking your system
✔ Loading configuration
✔ Resolving make targets
› Making for the following targets: squirrel
❯ Running package command
✔ Preparing to package application
✔ Running packaging hooks
✔ Running generateAssets hook
✔ Running prePackage hook
❯ Packaging application
❯ Packaging for x64 on win32
✖ Copying files
› EPERM: operation not permitted, rmdir 'C:\tmp\electron-packager\win32-x64\ctp-mod-manager-win32-x64-d1Tm1y\resources\app\src\components'
◼ Preparing native dependencies
◼ Finalizing package
◼ Running postPackage hook
◼ Running preMake hook
◼ Making distributables
◼ Running postMake hook
An unhandled rejection has occurred inside Forge:
Error: EPERM: operation not permitted, rmdir 'C:\tmp\electron-packager\win32-x64\app-win32-x64-d1Tm1y\resources\app\src\components'
This happens whether or not I am using env-cmd, and this tmp directory was created fresh (so there was definitely no interference from elevated command prompts, etc). This is just using straight Git Bash, non-elevated through the VS Code integrated terminal (with VS Code not being elevated, either). The components folder is also not empty.
Steps to reproduce
I am using the Vite-Typescript preset.
This is my full make command copied from package.json:
I have been using Git Bash specifically for this, not sure if it will reproduce on other terminals. The version of git reported within Git Bash is this: git version 2.42.0.windows.1 (I am not sure if there is another way to report a version of Git Bash's terminal specifically)
I couldn't reproduce the issue, could you provide another repro? From the logs you've provided, looks like you can hit this error just with electron-forge package instead of electron-forge make — this would help limit the issue scope.
Are you using Git Bash somewhere else along the process (e.g. to run create-electron-app or to create the tmp directory) or are you just trying to make/package the app with it?
I couldn't reproduce the issue, could you provide another repro? From the logs you've provided, looks like you can hit this error just with electron-forge package instead of electron-forge make — this would help limit the issue scope.
Are you using Git Bash somewhere else along the process (e.g. to run create-electron-app or to create the tmp directory) or are you just trying to make/package the app with it?
I figured it out (definitely this time). I think there are permission issues within the Documents folder or something on my setup - when I cloned the repo a level up ("~" in Git Bash), suddenly I was able to make and package just fine. Sorry about that!
Pre-flight checklist
Electron Forge version
6.4.2
Electron version
24.8.5
Operating system
Windows 11 22H2 (22621.2361)
Last known working Electron Forge version
6.4.2
Expected behavior
A successful output from
electron-forge make --platform=win32
(using Squirrel).Actual behavior
This happens whether or not I am using
env-cmd
, and thistmp
directory was created fresh (so there was definitely no interference from elevated command prompts, etc). This is just using straight Git Bash, non-elevated through the VS Code integrated terminal (with VS Code not being elevated, either). The components folder is also not empty.Steps to reproduce
I am using the Vite-Typescript preset.
This is my full make command copied from
package.json
:Here is my
forge.config.ts
:I used
overwrite
,asar
andtmpdir
each to try to fix this issue (with none of them fixing it).Additional information
Output of debug:
The rest of the asked-for info is in the "Steps to reproduce" section. I have also tried using
npm ci
a few times to no avail.The text was updated successfully, but these errors were encountered: