Steps to reproduce
When building Element Desktop on Windows, the error "EPERM: operation not permitted" occurs.
c:\element-web\apps\desktop>pnpm run build
$ nx build --
> nx run element-desktop:"build:ts"
> tsc
> nx run element-desktop:"build:res"
> node scripts/copy-res.ts
> nx run element-desktop:build
> pnpm exec electron-builder
• electron-builder version=26.15.3 os=10.0.19045
No VARIANT_PATH specified, using default variant configuration 'element.io\release\build.json':
appId: im.riot.app
name: element-desktop
productName: Element
description: Element: the future of secure communication
protocols: io.element.desktop,element
• loaded configuration file=C:\element-web\apps\desktop\electron-builder.ts
• packageManager not detected by file, falling back to environment detection resolvedPackageManager=pnpm detected=C:\element-web\apps\desktop
• executing @electron/rebuild electronVersion=43.0.0 arch=x64 buildFromSource=false workspaceRoot=C:\element-web\apps\desktop projectDir=./ appDir=./
• installing native dependencies arch=x64
• completed installing native dependencies
• packaging platform=win32 arch=x64 electron=43.0.0 appOutDir=dist\win-unpacked
• downloaded label=electron progress=100%
⨯ EPERM: operation not permitted, rename 'C:\element-web\apps\desktop\dist\win-unpacked.tmp' -> 'C:\element-web\apps\desktop\dist\win-unpacked' failedTask=build stackTrace=Error: EPERM: operation not permitted, rename 'C:\element-web\apps\desktop\dist\win-unpacked.tmp' -> 'C:\element-web\apps\desktop\dist\win-unpacked'
at Object.rename (node:internal/fs/promises:785:10)
at extractArchive (C:\element-web\node_modules\.pnpm\app-builder-lib@26.15.3_dmg_c5739d9600ac3f98a55503c35c5a46a9\node_modules\app-builder-lib\src\util\electronGet.ts:249:5)
at unpack (C:\element-web\node_modules\.pnpm\app-builder-lib@26.15.3_dmg_c5739d9600ac3f98a55503c35c5a46a9\node_modules\app-builder-lib\src\electron\ElectronFramework.ts:254:5)
at ElectronFramework.prepareApplicationStageDirectory (C:\element-web\node_modules\.pnpm\app-builder-lib@26.15.3_dmg_c5739d9600ac3f98a55503c35c5a46a9\node_modules\app-builder-lib\src\electron\ElectronFramework.ts:152:27)
at WinPackager.doPack (C:\element-web\node_modules\.pnpm\app-builder-lib@26.15.3_dmg_c5739d9600ac3f98a55503c35c5a46a9\node_modules\app-builder-lib\src\platformPackager.ts:257:5)
at WinPackager.pack (C:\element-web\node_modules\.pnpm\app-builder-lib@26.15.3_dmg_c5739d9600ac3f98a55503c35c5a46a9\node_modules\app-builder-lib\src\platformPackager.ts:163:5)
at Packager.doBuild (C:\element-web\node_modules\.pnpm\app-builder-lib@26.15.3_dmg_c5739d9600ac3f98a55503c35c5a46a9\node_modules\app-builder-lib\src\packager.ts:530:11)
at executeFinally (C:\element-web\node_modules\.pnpm\builder-util@26.15.3\node_modules\builder-util\src\promise.ts:12:14)
at Packager.build (C:\element-web\node_modules\.pnpm\app-builder-lib@26.15.3_dmg_c5739d9600ac3f98a55503c35c5a46a9\node_modules\app-builder-lib\src\packager.ts:450:31)
at executeFinally (C:\element-web\node_modules\.pnpm\builder-util@26.15.3\node_modules\builder-util\src\promise.ts:12:14)
———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
NX Ran target build for project element-desktop and 2 task(s) they depend on (11s)
× 1/3 failed
√ 2/3 succeeded [0 read from cache]
[ELIFECYCLE] Command failed with exit code 1.
Steps to reproduce:
git clone https://github.com/element-hq/element-web.git
cd c:\element-web\apps\desktop\
pnpm install
pnpm run fetch --noverify --cfgdir ""
pnpm run build
here is the full log fulllog.txt
In the resmon, I see that the folder "C:\element-web\apps\desktop\dist\win-unpacked.tmp" is locked by node.exe and NX can't rename it. It looks like that node has locked itself.
p.s. I run all commands as administrator
Outcome
What did you expect?
successful build
What happened instead?
error at the build stage
Operating system
Windows 10
Application version
Element Desktop 1.12.23
How did you install the app?
No response
Homeserver
No response
Will you send logs?
No
Steps to reproduce
When building Element Desktop on Windows, the error "EPERM: operation not permitted" occurs.
Steps to reproduce:
here is the full log fulllog.txt
In the resmon, I see that the folder "C:\element-web\apps\desktop\dist\win-unpacked.tmp" is locked by node.exe and NX can't rename it. It looks like that node has locked itself.
p.s. I run all commands as administrator
Outcome
What did you expect?
successful build
What happened instead?
error at the build stage
Operating system
Windows 10
Application version
Element Desktop 1.12.23
How did you install the app?
No response
Homeserver
No response
Will you send logs?
No