-
-
Notifications
You must be signed in to change notification settings - Fork 37
Description
The /resources/app folder can't be deleted because its permissions are somehow broken. I get this error either by trying to package as an asar or when trying to overwrite a previous build when using the Programmatic API with electron-packager installed locally in the folder.
{ Error: EPERM: operation not permitted, rmdir 'D:\user\appNameFolder\appName-win32-x64\resources\app'
at Error (native)
errno: -4048,
code: 'EPERM',
syscall: 'rmdir',
path: 'D:\\user\\appNameFolder\\appName-win32-x64\\resources\\app' }
When I use command line using the global package.
EPERM: operation not permitted, rmdir 'C:\Users\User\AppData\Local\Temp\electron-packager\win32-x64\appName-win32-x64\resources\app'
After this error occurs, I can delete the app folder myself but I can't using the rmdir Windows command and it returns "Access is Denied". If I check the permissions through the properties window it has the same settings as any other folder. I'm not sure what's causing this error and I've tried investigating but haven't gotten anywhere so far.
I figured it might be problem with npm but I've tried reinstalling npm and nodejs multiple times to no avail.
After the error occurs once with the command line, using it a second time will cause no console output. This can be fixed by deleting the AppData/Local/Temp/electron-packager folder. It gets stuck here because it doesn't have permission to delete the app folder from the previous build.
Which version of electron-packager are you using?
7.0.4
What CLI arguments are you passing? Alternatively, if you are using the API, what parameters are
you passing to thepackager()function?
for the packager() function
const options = {
platform: 'win32',
arch: 'x64',
dir: '.',
version: '1.2.3',
tmpdir: false,
asar: true,
overwrite: true
};
for the command line
electron-packager . --platform=win32 --arch=x64 --version=1.2.3
Although I have tried many other options with no success.
What version of Electron are you building with?
Tried 1.2.1 and 1.2.3
What is the host platform are you running electron-packager on?
Windows 10 x64
What target platform(s)/architecture(s) are you building for?
win32 x64Please provide either a failing testcase or detailed steps to reproduce your problem.
Installing it both globally