Using Windows 10, Node v12.13.0 and NPM v6.12.0 along with electron and I receive the following below when I run npm run package-win to build my exe, I've never experienced something like this before.
EPERM: operation not permitted, lstat 'C:\Users\devbox\AppData\Local\Temp\electron-download-sOTFU2\electron-v1.8.8-win32-ia32.zip'
Things I have tried:
Edited my .npmrc file which has the following: strict-ssl=false registry=http://registry.npmjs.org/ Run my cmd as administrator (Administrator: Command Prompt) Restarted my computer and flushed npm cache Disabled antivirus then discovered electron-builder
I then installed electron-builder but when running electron-builder -w I run into the following below:
• cannot move downloaded into final location (another process downloaded faster?) path=C:\Users\devbox\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4 tempFile=C:\Users\devbox\AppData\Local\electron-builder\Cache\nsis\527857811 error=rename C:\Users\devbox\AppData\Local\electron-builder\Cache\nsis\527857811 C:\Users\devbox\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4: Access is denied. ⨯ ENOENT: no such file or directory, copyfile 'C:\Users\devbox\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4\elevate.exe' -> 'C:\Users\devbox\Desktop\electron\boxapp\dist\win-unpacked\resources\elevate.exe' stackTrace= Error: ENOENT: no such file or directory, copyfile 'C:\Users\devbox\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4\elevate.exe' -> 'C:\Users\devbox\Desktop\electron\boxapp\dist\win-unpacked\resources\elevate.exe' at processImmediate (internal/timers.js:439:21)
I am not able to make a folder in the specified directory above due to IT restrictions... is there a way I can specify another folder/path in my package.json file in hopes of getting around this block/error? I do have an exe that is working but this error in the build process has me concerned that something is not 100%. Can anyone share some suggestions or workarounds?